This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 1324f0b2d6 Fix regression in user provided SSLContext support
1324f0b2d6 is described below
commit 1324f0b2d62fa7efa875ee5cc9bea6fcadd90f52
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Mar 18 20:23:53 2024 +0000
Fix regression in user provided SSLContext support
This broke the TLSCertificateReloadListener
---
java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java | 8 +++++++-
webapps/docs/changelog.xml | 6 ++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java
b/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java
index b2a3390c6a..9676174cd1 100644
--- a/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java
@@ -101,8 +101,14 @@ public abstract class AbstractJsseEndpoint<S,U> extends
AbstractEndpoint<S,U> {
}
SSLContext sslContext = certificate.getSslContext();
+ SSLContext sslContextGenerated =
certificate.getSslContextGenerated();
// Generate the SSLContext from configuration unless (e.g.
embedded) an SSLContext has been provided.
- if (sslContext == null) {
+ // Need to handle both initial configuration and reload.
+ // Initial, SSLContext provided - sslContext will be non-null
and sslContextGenerated will be null
+ // Initial, SSLContext not provided - sslContext null and
sslContextGenerated will be null
+ // Reload, SSLContext provided - sslContext will be non-null
and sslContextGenerated will be null
+ // Reload, SSLContext not provided - sslContext non-null and
equal to sslContextGenerated
+ if (sslContext == null || sslContext == sslContextGenerated) {
try {
sslContext = sslUtil.createSSLContext(negotiableProtocols);
} catch (Exception e) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 538bd09ad0..a3f4eb131f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -209,6 +209,12 @@
added to the backlog immediately rather than waiting until the write
attempt for the remaining content. (markt)
</fix>
+ <fix>
+ Correct a regression in the support for user provided
+ <code>SSLContext</code> instances that broke the
+ <code>org.apache.catalina.security.TLSCertificateReloadListener</code>.
+ (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]