Changeset 6006


Ignore:
Timestamp:
May 27, 2019 3:54:27 AM (5 years ago)
Author:
ming
Message:

Fixed #2203: Failure to set minimum SSL version when OpenSSL 1.1 is used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c

    r6004 r6006  
    725725 
    726726    /* Determine SSL method to use */ 
     727    /* Specific version methods are deprecated since 1.1.0 */ 
    727728#if (USING_LIBRESSL && LIBRESSL_VERSION_NUMBER < 0x2020100fL)\ 
    728729    || OPENSSL_VERSION_NUMBER < 0x10100000L 
     
    742743        break; 
    743744    } 
     745#endif 
     746 
     747    if (!ssl_method) { 
     748#if (USING_LIBRESSL && LIBRESSL_VERSION_NUMBER < 0x2020100fL)\ 
     749    || OPENSSL_VERSION_NUMBER < 0x10100000L 
     750        ssl_method = (SSL_METHOD*)SSLv23_method(); 
    744751#else 
    745     /* Specific version methods are deprecated in 1.1.0 */ 
    746     ssl_method = (SSL_METHOD*)TLS_method(); 
    747 #endif 
    748  
    749     if (!ssl_method) { 
    750         ssl_method = (SSL_METHOD*)SSLv23_method(); 
     752        ssl_method = (SSL_METHOD*)TLS_method(); 
     753#endif 
    751754 
    752755#ifdef SSL_OP_NO_SSLv2 
Note: See TracChangeset for help on using the changeset viewer.