This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 62ad0fd5b1 Fix regression in user provided SSLContext support
62ad0fd5b1 is described below
commit 62ad0fd5b1dc02421e6022d4837193bdca84a3b3
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 b75002de38..bffb874b4a 100644
--- a/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractJsseEndpoint.java
@@ -100,8 +100,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 96e1e9ef1a..79ebc663b2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -183,6 +183,12 @@
will scale back to the configured <code>minSpareThreads</code> size.
(remm)
</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]