summaryrefslogtreecommitdiffstats
path: root/modules/ssl/ssl_engine_init.c
diff options
context:
space:
mode:
authorRainer Jung <rjung@apache.org>2023-08-30 14:56:11 +0200
committerRainer Jung <rjung@apache.org>2023-08-30 14:56:11 +0200
commitb9e029c8036fd036281ac266010db91aed6079b2 (patch)
treee8c76797b194bce6702adf9721a96c2b440efd5c /modules/ssl/ssl_engine_init.c
parent *) mod_proxy_http2: improved error handling on connection errors while (diff)
downloadapache2-b9e029c8036fd036281ac266010db91aed6079b2.tar.xz
apache2-b9e029c8036fd036281ac266010db91aed6079b2.zip
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] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1912015 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/ssl/ssl_engine_init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
index 5baeb03abb..56938868b8 100644
--- a/modules/ssl/ssl_engine_init.c
+++ b/modules/ssl/ssl_engine_init.c
@@ -891,6 +891,14 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
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;
}