Changeset 5726 for pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c
- Timestamp:
- Jan 17, 2018 11:15:34 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c
r5725 r5726 56 56 #include <openssl/rand.h> 57 57 #include <openssl/opensslconf.h> 58 59 #if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL 58 #include <openssl/opensslv.h> 59 60 #define USING_LIBRESSL (defined(LIBRESSL_VERSION_NUMBER)) 61 62 #if !USING_LIBRESSL && !defined(OPENSSL_NO_EC) \ 63 && OPENSSL_VERSION_NUMBER >= 0x1000200fL 60 64 61 65 # include <openssl/obj_mac.h> … … 115 119 116 120 117 #if OPENSSL_VERSION_NUMBER >= 0x10100000L121 #if !USING_LIBRESSL && OPENSSL_VERSION_NUMBER >= 0x10100000L 118 122 # define OPENSSL_NO_SSL2 /* seems to be removed in 1.1.0 */ 119 123 # define M_ASN1_STRING_data(x) ASN1_STRING_get0_data(x) … … 539 543 540 544 /* Init OpenSSL lib */ 541 #if OPENSSL_VERSION_NUMBER < 0x10100000L545 #if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L 542 546 SSL_library_init(); 543 547 SSL_load_error_strings(); … … 560 564 const char *cname; 561 565 562 #if OPENSSL_VERSION_NUMBER < 0x10100000L 566 #if (USING_LIBRESSL && LIBRESSL_VERSION_NUMBER < 0x2020100fL)\ 567 || OPENSSL_VERSION_NUMBER < 0x10100000L 568 563 569 meth = (SSL_METHOD*)SSLv23_server_method(); 564 570 if (!meth) … … 603 609 SSL_set_session(ssl, SSL_SESSION_new()); 604 610 605 #if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL 611 #if !USING_LIBRESSL && !defined(OPENSSL_NO_EC) \ 612 && OPENSSL_VERSION_NUMBER >= 0x1000200fL 606 613 openssl_curves_num = SSL_get_shared_curve(ssl,-1); 607 614 if (openssl_curves_num > PJ_ARRAY_SIZE(openssl_curves)) … … 795 802 796 803 /* Determine SSL method to use */ 797 #if OPENSSL_VERSION_NUMBER < 0x10100000L 804 #if (USING_LIBRESSL && LIBRESSL_VERSION_NUMBER < 0x2020100fL)\ 805 || OPENSSL_VERSION_NUMBER < 0x10100000L 798 806 switch (ssock->param.proto) { 799 807 case PJ_SSL_SOCK_PROTO_TLS1: … … 1232 1240 static pj_status_t set_curves_list(pj_ssl_sock_t *ssock) 1233 1241 { 1234 #if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL 1242 #if !USING_LIBRESSL && !defined(OPENSSL_NO_EC) \ 1243 && OPENSSL_VERSION_NUMBER >= 0x1000200fL 1235 1244 int ret; 1236 1245 int curves[PJ_SSL_SOCK_MAX_CURVES]; … … 1263 1272 static pj_status_t set_sigalgs(pj_ssl_sock_t *ssock) 1264 1273 { 1265 #if OPENSSL_VERSION_NUMBER >= 0x1000200fL1274 #if !USING_LIBRESSL && OPENSSL_VERSION_NUMBER >= 0x1000200fL 1266 1275 int ret; 1267 1276
Note: See TracChangeset
for help on using the changeset viewer.