]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: use `SSL_CTX_set_keylog_callback` with LibreSSL 3.5.0
authorViktor Szakats <commit@vsz.me>
Mon, 7 Aug 2023 22:34:26 +0000 (22:34 +0000)
committerViktor Szakats <commit@vsz.me>
Tue, 8 Aug 2023 09:10:04 +0000 (09:10 +0000)
LibreSSL 3.5.0 (2022-02-24) added support for
`SSL_CTX_set_keylog_callback`.

Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.0-relnotes.txt

Reviewed-by: Jay Satiro
Closes #11615

lib/vtls/openssl.c

index 303032d14a5057933e795ddc4b9cc79be7b056f8..43c9dd395c7b610bff7accce340e094fb2129c6e 100644 (file)
  * Whether SSL_CTX_set_keylog_callback is available.
  * OpenSSL: supported since 1.1.1 https://github.com/openssl/openssl/pull/2287
  * BoringSSL: supported since d28f59c27bac (committed 2015-11-19)
- * LibreSSL: unsupported in at least 2.7.2 (explicitly check for it since it
- *           lies and pretends to be OpenSSL 2.0.0).
+ * LibreSSL: supported since 3.5.0 (released 2022-02-24)
  */
 #if (OPENSSL_VERSION_NUMBER >= 0x10101000L && \
      !defined(LIBRESSL_VERSION_NUMBER)) || \
+    (defined(LIBRESSL_VERSION_NUMBER) && \
+     LIBRESSL_VERSION_NUMBER >= 0x3050000fL) || \
     defined(OPENSSL_IS_BORINGSSL)
 #define HAVE_KEYLOG_CALLBACK
 #endif