Changeset 3039 for pjproject/trunk/pjsip/src/pjsip/sip_transport_tls.c
- Timestamp:
- Dec 30, 2009 6:35:20 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transport_tls.c
r3020 r3039 55 55 pjsip_tpmgr *tpmgr; 56 56 pj_ssl_sock_t *ssock; 57 pj_ssl_cert_t *cert; 57 58 pjsip_tls_setting tls_setting; 58 59 }; … … 289 290 } 290 291 291 /* Check if certificate for SSL socket is set */ 292 if (listener->tls_setting.cert_file.slen) 292 /* Check if certificate/CA list for SSL socket is set */ 293 if (listener->tls_setting.cert_file.slen || 294 listener->tls_setting.ca_list_file.slen) 293 295 { 294 pj_ssl_cert_t *cert;295 296 296 status = pj_ssl_cert_load_from_files(pool, 297 297 &listener->tls_setting.ca_list_file, … … 299 299 &listener->tls_setting.privkey_file, 300 300 &listener->tls_setting.password, 301 & cert);301 &listener->cert); 302 302 if (status != PJ_SUCCESS) 303 303 goto on_error; 304 304 305 status = pj_ssl_sock_set_certificate(listener->ssock, pool, cert); 305 status = pj_ssl_sock_set_certificate(listener->ssock, pool, 306 listener->cert); 306 307 if (status != PJ_SUCCESS) 307 308 goto on_error; … … 838 839 return status; 839 840 841 /* Apply SSL certificate */ 842 if (listener->cert) { 843 status = pj_ssl_sock_set_certificate(ssock, pool, listener->cert); 844 if (status != PJ_SUCCESS) 845 return status; 846 } 847 840 848 /* Initially set bind address to PJ_INADDR_ANY port 0 */ 841 849 pj_sockaddr_in_init(&local_addr, NULL, 0);
Note: See TracChangeset
for help on using the changeset viewer.