This is an automated email from the ASF dual-hosted git repository.
rmaucher 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 f471faeb3f Skip certificate logging if SSLContext is null
f471faeb3f is described below
commit f471faeb3ff648266202cd4bcda037f3f351b758
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 5da43a58ea..51bc98274b 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -546,12 +546,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]