From ed784e9f84de9bac59c4922446783144c7f30dcf Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Wed, 17 Nov 2021 17:01:07 +0000 Subject: [PATCH] SSL: fixed reporting of the detected library version. Previously, `openssl version` command was used to report the OpenSSL version. Whereas, when provided with custom CFLAGS and LDFLAGS the used library may differ from the system one. The fix is to report OpenSSL version using the provided library. --- auto/openssl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/auto/openssl b/auto/openssl index 8409f75f..a494ea8a 100644 --- a/auto/openssl +++ b/auto/openssl @@ -25,7 +25,16 @@ njs_feature_test="#include if [ $njs_found = yes ]; then - echo " + OpenSSL version: `openssl version`" + njs_feature="OpenSSL version" + njs_feature_name=NJS_OPENSSL_VERSION + njs_feature_run=value + njs_feature_test="#include + + int main() { + printf(\"\\\"%s\\\"\", OPENSSL_VERSION_TEXT); + return 0; + }" + . auto/feature NJS_HAVE_OPENSSL=YES NJS_OPENSSL_LIB="$njs_feature_libs" -- 2.47.3