From 6b8573e8e18c13d1fe2ac8aea509d150066dc363 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Tue, 5 May 2015 06:41:17 +0000 Subject: Misc (re #1843): Fixed compile warnings on pjlib SSL socket with BoringSSL backend (thanks Alexander Traud for the patch). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5083 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/src/pj/ssl_sock_ossl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pjlib') diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c index 755059f5..e2726f66 100644 --- a/pjlib/src/pj/ssl_sock_ossl.c +++ b/pjlib/src/pj/ssl_sock_ossl.c @@ -318,7 +318,10 @@ static pj_status_t init_openssl(void) /* Init OpenSSL lib */ SSL_library_init(); SSL_load_error_strings(); +#if OPENSSL_VERSION_NUMBER < 0x009080ffL + /* This is now synonym of SSL_library_init() */ OpenSSL_add_all_algorithms(); +#endif /* Init available ciphers */ if (openssl_cipher_num == 0) { @@ -352,7 +355,7 @@ static pj_status_t init_openssl(void) n = PJ_ARRAY_SIZE(openssl_ciphers); for (i = 0; i < n; ++i) { - SSL_CIPHER *c; + const SSL_CIPHER *c; c = sk_SSL_CIPHER_value(sk_cipher,i); openssl_ciphers[i].id = (pj_ssl_cipher) (pj_uint32_t)c->id & 0x00FFFFFF; @@ -813,7 +816,7 @@ static pj_status_t set_cipher_list(pj_ssl_sock_t *ssock) sk_cipher = SSL_get_ciphers(ssock->ossl_ssl); for (i = 0; i < ssock->param.ciphers_num; ++i) { for (j = 0; j < sk_SSL_CIPHER_num(sk_cipher); ++j) { - SSL_CIPHER *c; + const SSL_CIPHER *c; c = sk_SSL_CIPHER_value(sk_cipher, j); if (ssock->param.ciphers[i] == (pj_ssl_cipher) ((pj_uint32_t)c->id & 0x00FFFFFF)) -- cgit v1.2.3