summaryrefslogtreecommitdiff
path: root/aconfigure.ac
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2017-01-23 03:34:17 +0000
committerNanang Izzuddin <nanang@teluu.com>2017-01-23 03:34:17 +0000
commitdfe36134873cb77d5b9c2a999f3134eb79f6ca6e (patch)
tree07f069addb5931cab5c0eff2cd72b90ca98ee855 /aconfigure.ac
parenta07aa383b4c1ecd13a06df348cc6b3796dae2a14 (diff)
Close #1932: Support OpenSSL 1.1.0.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5537 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'aconfigure.ac')
-rw-r--r--aconfigure.ac11
1 files changed, 8 insertions, 3 deletions
diff --git a/aconfigure.ac b/aconfigure.ac
index 4d40f307..c7e8d45a 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -1555,13 +1555,18 @@ AC_ARG_ENABLE(ssl,
AC_SUBST(libcrypto_present)
AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1])
AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"])
- AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 && LIBS="-lssl $LIBS"])
+ AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"])
if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
AC_MSG_RESULT([OpenSSL library found, SSL support enabled])
# Check if SRTP should be compiled with OpenSSL
- # support, to enable cryptos such as AES GCM
- AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1])
+ # support, to enable cryptos such as AES GCM.
+
+ # EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type.
+ # AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/evp.h>]],
+ [EVP_CIPHER_CTX ctx;EVP_aes_128_gcm();])],
+ [ac_ssl_has_aes_gcm=1])
if test "x$ac_ssl_has_aes_gcm" = "x1"; then
AC_MSG_RESULT([OpenSSL has AES GCM support, SRTP will use OpenSSL])
else