- Timestamp:
- Jan 23, 2017 4:18:59 AM (8 years ago)
- Location:
- pjproject/branches/projects/uwp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp
- Property svn:mergeinfo changed
/pjproject/trunk merged: 5533-5537
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/pjlib/src/pj/ssl_sock_ossl.c
r5532 r5538 46 46 * Include OpenSSL headers 47 47 */ 48 #include <openssl/asn1.h> 48 49 #include <openssl/bio.h> 49 50 #include <openssl/ssl.h> … … 111 112 #endif 112 113 114 115 #if OPENSSL_VERSION_NUMBER >= 0x10100000L 116 # define OPENSSL_NO_SSL2 /* seems to be removed in 1.1.0 */ 117 # define M_ASN1_STRING_data(x) ASN1_STRING_get0_data(x) 118 # define M_ASN1_STRING_length(x) ASN1_STRING_length(x) 119 #else 120 # define SSL_CIPHER_get_id(c) (c)->id 121 # define SSL_set_session(ssl, s) (ssl)->session = (s) 122 #endif 123 124 113 125 #ifdef _MSC_VER 114 126 # pragma comment( lib, "libeay32") 115 127 # pragma comment( lib, "ssleay32") 128 # pragma comment( lib, "crypt32") 116 129 #endif 117 130 … … 432 445 c = sk_SSL_CIPHER_value(sk_cipher,i); 433 446 openssl_ciphers[i].id = (pj_ssl_cipher) 434 (pj_uint32_t)c->id & 0x00FFFFFF; 447 (pj_uint32_t)SSL_CIPHER_get_id(c) & 448 0x00FFFFFF; 435 449 openssl_ciphers[i].name = SSL_CIPHER_get_name(c); 436 450 } 437 451 openssl_cipher_num = n; 438 452 439 ssl->session = SSL_SESSION_new();453 SSL_set_session(ssl, SSL_SESSION_new()); 440 454 441 455 #if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL … … 1014 1028 c = sk_SSL_CIPHER_value(sk_cipher, j); 1015 1029 if (ssock->param.ciphers[i] == (pj_ssl_cipher) 1016 ((pj_uint32_t)c->id & 0x00FFFFFF)) 1030 ((pj_uint32_t)SSL_CIPHER_get_id(c) & 1031 0x00FFFFFF)) 1017 1032 { 1018 1033 const char *c_name; … … 1067 1082 } 1068 1083 1069 if( ssock->ossl_ssl->server) {1084 if( SSL_is_server(ssock->ossl_ssl) ) { 1070 1085 ret = SSL_set1_curves(ssock->ossl_ssl, curves, 1071 1086 ssock->param.curves_num); … … 1226 1241 char buf[512]; 1227 1242 pj_uint8_t serial_no[64] = {0}; /* should be >= sizeof(ci->serial_no) */ 1228 pj_uint8_t *q;1243 const pj_uint8_t *q; 1229 1244 unsigned len; 1230 1245 GENERAL_NAMES *names = NULL; … … 1236 1251 1237 1252 /* Get serial no */ 1238 q = ( pj_uint8_t*) M_ASN1_STRING_data(X509_get_serialNumber(x));1253 q = (const pj_uint8_t*) M_ASN1_STRING_data(X509_get_serialNumber(x)); 1239 1254 len = M_ASN1_STRING_length(X509_get_serialNumber(x)); 1240 1255 if (len > sizeof(ci->serial_no)) … … 2643 2658 /* Current cipher */ 2644 2659 cipher = SSL_get_current_cipher(ssock->ossl_ssl); 2645 info->cipher = ( cipher->id& 0x00FFFFFF);2660 info->cipher = (SSL_CIPHER_get_id(cipher) & 0x00FFFFFF); 2646 2661 2647 2662 /* Remote address */
Note: See TracChangeset
for help on using the changeset viewer.