]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Only use OpenSSL kdf support if it is present.
authorNick Mathewson <nickm@torproject.org>
Wed, 11 Jul 2018 14:10:42 +0000 (10:10 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 11 Jul 2018 14:19:06 +0000 (10:19 -0400)
We have to check for ERR_load_KDF_strings() here, since that's the
only one that's actually a function rather than a macro.

Fixes compilation with LibreSSL.  Fixes bug 26712; bug not in
any released Tor.

configure.ac
src/lib/crypt_ops/crypto_hkdf.c

index 532476672a43cf7207ad455ddf18c4edb5d139a3..2ababb03bb7a52227dba7c937e7e902654c471f2 100644 (file)
@@ -902,6 +902,7 @@ AC_CHECK_MEMBERS([struct ssl_method_st.get_cipher_by_char], , ,
 ])
 
 AC_CHECK_FUNCS([ \
+               ERR_load_KDF_strings \
                SSL_SESSION_get_master_key \
                SSL_get_server_random \
                 SSL_get_client_ciphers \
index 0200d0fe9cd062d13a558ec5a601b154b11ad632..1873632a9d63075ad54e265f97a8487771aae682 100644 (file)
@@ -19,9 +19,9 @@
 
 #include <openssl/opensslv.h>
 
-#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
-#define HAVE_OPENSSL_HKDF 1
+#if defined(HAVE_ERR_LOAD_KDF_STRINGS)
 #include <openssl/kdf.h>
+#define HAVE_OPENSSL_HKDF 1
 #endif
 
 #include <string.h>