diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-01-11 17:04:44 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-01-13 17:06:59 +0100 |
commit | cf8c70594fda8aaba1b2b1d1e34deefe927434f9 (patch) | |
tree | e81fbedc2cdf472d4975af9f250b779bc4985134 /lib/vtls | |
parent | 52e27fe9c6421d36337c0b69df6ca2b3b2d72613 (diff) |
openssl: adapt to 3.0.0, OpenSSL_version_num() is deprecated
OpenSSL_version() replaces OpenSSL_version_num()
Closes #3462
Diffstat (limited to 'lib/vtls')
-rw-r--r-- | lib/vtls/openssl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 8bddb9a8c..45e72d6a3 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -3774,7 +3774,12 @@ static size_t Curl_ossl_version(char *buffer, size_t size) { #ifdef OPENSSL_IS_BORINGSSL return msnprintf(buffer, size, OSSL_PACKAGE); -#else /* OPENSSL_IS_BORINGSSL */ +#elif defined(HAVE_OPENSSL_VERSION) && defined(OPENSSL_VERSION_STRING) + return msnprintf(buffer, size, "%s/%s", + OSSL_PACKAGE, OpenSSL_version(OPENSSL_VERSION_STRING)); +#else + /* not BoringSSL and not using OpenSSL_version */ + char sub[3]; unsigned long ssleay_value; sub[2]='\0'; |