summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorFlorian Stinglmayr <florian@n0la.org>2016-12-13 18:41:43 +0100
committerPatrick Griffis <tingping@tingping.se>2016-12-13 17:12:04 -0500
commitd583ca7d922e5ac6ff466df2e4411b1303a3a2a3 (patch)
treeab5f6684583b4ae6e59e12f2978208621121fdb0 /src/common
parent1b760dd22bb6d4925c4aecd566041e0cb415e2d8 (diff)
Use AC_CHECK_FUNCS to find functions not in LibreSSL
LibreSSL might not have all functions of OpenSSL 1.1.0 so use
AC_CHECK_FUNCS to find them first before using them.

Closes #1899
Fixes #1898
Diffstat (limited to 'src/common')
-rw-r--r--src/common/ssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/ssl.c b/src/common/ssl.c
index cb58ce25..76fea7b4 100644
--- a/src/common/ssl.c
+++ b/src/common/ssl.c
@@ -176,7 +176,7 @@ _SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl)
 		return 1;
 
 	alg = OBJ_obj2nid (algor->algorithm);
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#ifndef HAVE_X509_GET_SIGNATURE_NID
 	sign_alg = OBJ_obj2nid (peer_cert->sig_alg->algorithm);
 #else
 	sign_alg = X509_get_signature_nid (peer_cert);
@@ -306,7 +306,7 @@ _SSL_socket (SSL_CTX *ctx, int sd)
 
 	SSL_set_fd (ssl, sd);
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#ifndef HAVE_SSL_CTX_GET_SSL_METHOD
 	method = ctx->method;
 #else
 	method = SSL_CTX_get_ssl_method (ctx);