You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2023/08/30 12:56:12 UTC

svn commit: r1912015 - /httpd/httpd/trunk/modules/ssl/ssl_engine_init.c

Author: rjung
Date: Wed Aug 30 12:56:11 2023
New Revision: 1912015

URL: http://svn.apache.org/viewvc?rev=1912015&view=rev
Log:
mod_ssl: Silence info log message "SSL Library Error: error:0A000126:
         SSL routines::unexpected eof while reading" when using
         OpenSSL 3 by setting SSL_OP_IGNORE_UNEXPECTED_EOF if
         available. [Rainer Jung]

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_engine_init.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_init.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_init.c?rev=1912015&r1=1912014&r2=1912015&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_init.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_init.c Wed Aug 30 12:56:11 2023
@@ -891,6 +891,14 @@ static apr_status_t ssl_init_ctx_protoco
         SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION);
     }
 #endif
+
+#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF
+    /* For server-side SSL_CTX, enable ignoring unexpected EOF */
+    /* (OpenSSL 1.1.1 behavioural compatibility).. */
+    if (!mctx->pkp) {
+        SSL_CTX_set_options(ctx, SSL_OP_IGNORE_UNEXPECTED_EOF);
+    }
+#endif
     
     return APR_SUCCESS;
 }