Skip to content

Commit 9b06444

Browse files
committed
* modules/ssl/ssl_private.h: Fix logic in r1926720 HAVE_OPENSSL_KEYLOG macro,
thanks to rpluem. Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1926722 13f79535-47bb-0310-9956-ffa450edef68
1 parent c2ffd2a commit 9b06444

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

modules/ssl/ssl_private.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,15 @@ void free_bio_methods(void);
296296
#define X509_get_notAfter X509_getm_notAfter
297297
#endif
298298

299-
/* For OpenSSL 3.5.0+, don't handle $SSLKEYLOGFILE since libssl does -
300-
* unless OpenSSL was built with no-sslkeylog, which drops the env var
301-
* handling, but leaves the API intact. */
299+
/* The SSL_CTX_set_keylog_callback() API is present in 1.1.1+.
300+
*
301+
* OpenSSL 3.5+ also provides optional native handling of
302+
* $SSLKEYLOGFILE inside libssl, which duplicates the mod_ssl support.
303+
* The mod_ssl support is hence disabled for 3.5+, unless that OpenSSL
304+
* feature is itself disabled (and OPENSSL_NO_SSLKEYLOG is defined).
305+
*/
302306
#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER) \
303-
&& (OPENSSL_VERSION_NUMBER <= 0x30500000L || !defined(OPENSSL_NO_SSLKEYLOG))
307+
&& (OPENSSL_VERSION_NUMBER <= 0x30500000L || defined(OPENSSL_NO_SSLKEYLOG))
304308
#define HAVE_OPENSSL_KEYLOG
305309
#endif
306310

0 commit comments

Comments
 (0)