Changeset 5726
- Timestamp:
- Jan 17, 2018 11:15:34 AM (7 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 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 -
pjproject/trunk/third_party/srtp/crypto/hash/hmac_ossl.c
r5614 r5726 52 52 #include <openssl/evp.h> 53 53 #include <openssl/hmac.h> 54 #include <openssl/opensslv.h> 54 55 55 56 #define SHA1_DIGEST_SIZE 20 57 #define USING_LIBRESSL (defined(LIBRESSL_VERSION_NUMBER)) 56 58 57 59 /* the debug module for authentiation */ … … 77 79 /* OpenSSL 1.1.0 made HMAC_CTX an opaque structure, which must be allocated 78 80 using HMAC_CTX_new. But this function doesn't exist in OpenSSL 1.0.x. */ 79 #if OPENSSL_VERSION_NUMBER < 0x10100000L81 #if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L 80 82 { 81 83 /* allocate memory for auth and HMAC_CTX structures */ … … 122 124 hmac_ctx = (HMAC_CTX*)a->state; 123 125 124 #if OPENSSL_VERSION_NUMBER < 0x10100000L126 #if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L 125 127 HMAC_CTX_cleanup(hmac_ctx); 126 128
Note: See TracChangeset
for help on using the changeset viewer.