]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: handle boringssl in openssl version detection
authorLukas Tribus <luky-37@hotmail.com>
Sun, 17 Aug 2014 22:56:30 +0000 (00:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 18 Aug 2014 12:33:48 +0000 (14:33 +0200)
Google's boringssl doesn't have OPENSSL_VERSION_TEXT, SSLeay_version()
or SSLEAY_VERSION, in fact, it doesn't have any real versioning, its
just git-based.

So in case we build against boringssl, we can't access those values.

Instead, we just inform the user that HAProxy was build against
boringssl.

Signed-off-by: Lukas Tribus <luky-37@hotmail.com>
src/haproxy.c

index 9f742c75b1bfb039ee57b700cc89b9e5703e7c5c..74b268787a11dbe46db38b07768a8c68c6a9de41 100644 (file)
@@ -269,10 +269,15 @@ void display_build_opts()
        printf("\n");
 
 #ifdef USE_OPENSSL
-       printf("Built with OpenSSL version : " OPENSSL_VERSION_TEXT "\n");
+       printf("Built with OpenSSL version : "
+#ifdef OPENSSL_IS_BORINGSSL
+              "BoringSSL\n");
+#else /* OPENSSL_IS_BORINGSSL */
+               OPENSSL_VERSION_TEXT "\n");
        printf("Running on OpenSSL version : %s%s\n",
               SSLeay_version(SSLEAY_VERSION),
               ((OPENSSL_VERSION_NUMBER ^ SSLeay()) >> 8) ? " (VERSIONS DIFFER!)" : "");
+#endif
        printf("OpenSSL library supports TLS extensions : "
 #if OPENSSL_VERSION_NUMBER < 0x00907000L
               "no (library version too old)"