]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Fix build with current OpenSSL master branch snapshot
authorJouni Malinen <j@w1.fi>
Thu, 3 Dec 2015 21:53:35 +0000 (23:53 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 3 Dec 2015 21:53:35 +0000 (23:53 +0200)
OpenSSL 1.1.x will apparently go out with "SSLeay" renamed in the API to
"OpenSSL", which broke the build here for fetching the version of the
running OpenSSL library when wpa_supplicant/hostapd is built against the
current OpenSSL snapshot.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/tls_openssl.c

index 388346566e68bc6bba5b98eb0a678ac7483b4ad1..030e1e2fbc1a2161d3cac203afffa2e9bab6ecd4 100644 (file)
@@ -5012,9 +5012,15 @@ int tls_connection_set_session_ticket_cb(void *tls_ctx,
 
 int tls_get_library_version(char *buf, size_t buf_len)
 {
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+       return os_snprintf(buf, buf_len, "OpenSSL build=%s run=%s",
+                          OPENSSL_VERSION_TEXT,
+                          OpenSSL_version(OPENSSL_VERSION));
+#else
        return os_snprintf(buf, buf_len, "OpenSSL build=%s run=%s",
                           OPENSSL_VERSION_TEXT,
                           SSLeay_version(SSLEAY_VERSION));
+#endif
 }