diff options
author | Liong Sauw Ming <ming@teluu.com> | 2015-04-23 10:18:52 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2015-04-23 10:18:52 +0000 |
commit | 606180e833ddb27238df07125b59166db9f019ff (patch) | |
tree | 534ddaf37e2c51630545ac2694e8122dbdf487bf /pjlib/src/pj | |
parent | 5ff7a55927d627a06e7643d2009f9fa1c57c50af (diff) |
Fixed #1846: Update to use 'HIGH' ciphers as default in OpenSSL
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5078 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj')
-rw-r--r-- | pjlib/src/pj/ssl_sock_ossl.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c index 07e81d1a..de54844d 100644 --- a/pjlib/src/pj/ssl_sock_ossl.c +++ b/pjlib/src/pj/ssl_sock_ossl.c @@ -783,8 +783,14 @@ static pj_status_t set_cipher_list(pj_ssl_sock_t *ssock) unsigned i; int j, ret; - if (ssock->param.ciphers_num == 0) + if (ssock->param.ciphers_num == 0) { + ret = SSL_set_cipher_list(ssock->ossl_ssl, PJ_SSL_SOCK_OSSL_CIPHERS); + if (ret < 1) { + return GET_SSL_STATUS(ssock); + } + return PJ_SUCCESS; + } pj_strset(&cipher_list, buf, 0); @@ -805,7 +811,9 @@ static pj_status_t set_cipher_list(pj_ssl_sock_t *ssock) c_name = SSL_CIPHER_get_name(c); /* Check buffer size */ - if (cipher_list.slen + pj_ansi_strlen(c_name) + 2 > sizeof(buf)) { + if (cipher_list.slen + pj_ansi_strlen(c_name) + 2 > + sizeof(buf)) + { pj_assert(!"Insufficient temporary buffer for cipher"); return PJ_ETOOMANY; } |