Changeset 5980 for pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c
- Timestamp:
- May 9, 2019 4:35:41 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c
r5941 r5980 804 804 status = GET_SSL_STATUS(ssock); 805 805 if (cert->CA_file.slen) { 806 PJ_ LOG(1,(ssock->pool->obj_name,807 808 806 PJ_PERROR(1,(ssock->pool->obj_name, status, 807 "Error loading CA list file '%s'", 808 cert->CA_file.ptr)); 809 809 } 810 810 if (cert->CA_path.slen) { 811 PJ_ LOG(1,(ssock->pool->obj_name,812 813 811 PJ_PERROR(1,(ssock->pool->obj_name, status, 812 "Error loading CA path '%s'", 813 cert->CA_path.ptr)); 814 814 } 815 815 SSL_CTX_free(ctx); … … 833 833 if(rc != 1) { 834 834 status = GET_SSL_STATUS(ssock); 835 PJ_LOG(1,(ssock->pool->obj_name, "Error loading certificate " 836 "chain file '%s'", cert->cert_file.ptr)); 835 PJ_PERROR(1,(ssock->pool->obj_name, status, 836 "Error loading certificate chain file '%s'", 837 cert->cert_file.ptr)); 837 838 SSL_CTX_free(ctx); 838 839 return status; … … 849 850 if(rc != 1) { 850 851 status = GET_SSL_STATUS(ssock); 851 PJ_LOG(1,(ssock->pool->obj_name, "Error adding private key " 852 "from '%s'", cert->privkey_file.ptr)); 852 PJ_PERROR(1,(ssock->pool->obj_name, status, 853 "Error adding private key from '%s'", 854 cert->privkey_file.ptr)); 853 855 SSL_CTX_free(ctx); 854 856 return status; … … 892 894 if (rc != 1) { 893 895 status = GET_SSL_STATUS(ssock); 894 PJ_ LOG(1, (ssock->pool->obj_name, "Error loading "895 "chain certificate from buffer"));896 PJ_PERROR(1,(ssock->pool->obj_name, status, 897 "Error loading chain certificate from buffer")); 896 898 X509_free(xcert); 897 899 BIO_free(cbio); … … 940 942 if (rc != 1) { 941 943 status = GET_SSL_STATUS(ssock); 942 PJ_ LOG(1, (ssock->pool->obj_name, "Error adding "943 "private key from buffer"));944 PJ_PERROR(1,(ssock->pool->obj_name, status, 945 "Error adding private key from buffer")); 944 946 EVP_PKEY_free(pkey); 945 947 BIO_free(kbio); … … 1004 1006 "Additional certificate '%s' loaded.", cf)); 1005 1007 } else { 1006 pj_perror(1,ssock->pool->obj_name, GET_SSL_STATUS(ssock),1007 "Error loading certificate file '%s'", cf);1008 PJ_PERROR(1,(ssock->pool->obj_name, GET_SSL_STATUS(ssock), 1009 "Error loading certificate file '%s'", cf)); 1008 1010 ERR_clear_error(); 1009 1011 } … … 1306 1308 static void set_entropy(pj_ssl_sock_t *ssock) 1307 1309 { 1308 int ret ;1310 int ret = 0; 1309 1311 1310 1312 switch (ssock->param.entropy_type) { … … 1324 1326 break; 1325 1327 case PJ_SSL_ENTROPY_NONE: 1326 default: 1327 return; 1328 default: 1328 1329 break; 1329 1330 } 1330 1331 1331 1332 if (ret < 0) { 1332 PJ_LOG(3, (ssock->pool->obj_name, "SSL failed to reseed with " 1333 "entropy type %d", 1334 ssock->param.entropy_type)); 1333 PJ_LOG(3, (ssock->pool->obj_name, 1334 "SSL failed to reseed with entropy type %d " 1335 "[native err=%d]", 1336 ssock->param.entropy_type, ret)); 1335 1337 } 1336 1338 }
Note: See TracChangeset
for help on using the changeset viewer.