This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 10933e6cb5 Skip certificate logging if SSLContext is null
10933e6cb5 is described below
commit 10933e6cb56b1400af6ffba6e45aafdaeb87094e
Author: remm <[email protected]>
AuthorDate: Fri Aug 28 17:53:48 2026 +0200
Skip certificate logging if SSLContext is null
---
java/org/apache/tomcat/util/net/AbstractEndpoint.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index 85f1c9e234..f766a04e56 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -640,12 +640,13 @@ public abstract class AbstractEndpoint<S, U> {
getLogCertificate().info(sm.getString("endpoint.tls.info", getName(),
sslHostConfig.getHostName(),
certificate.getType(), certificateInfo, trustStoreSource));
- if (getLogCertificate().isDebugEnabled()) {
+ SSLContext sslContext = certificate.getSslContext();
+ if (getLogCertificate().isDebugEnabled() && sslContext != null) {
String alias = certificate.getCertificateKeyAlias();
if (alias == null) {
alias = SSLUtilBase.DEFAULT_KEY_ALIAS;
}
- X509Certificate[] x509Certificates =
certificate.getSslContext().getCertificateChain(alias);
+ X509Certificate[] x509Certificates =
sslContext.getCertificateChain(alias);
if (x509Certificates != null && x509Certificates.length > 0) {
getLogCertificate().debug(generateCertificateDebug(x509Certificates[0]));
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]