This is an automated email from the ASF dual-hosted git repository.

dsoumis pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit c6a54476eeed50961e6c426c8705439ff2afab15
Author: Dimitris Soumis <[email protected]>
AuthorDate: Wed Nov 4 13:33:15 2026 +0200

    Fix a missing alias being treated the same way as a present but unsuitable 
certificate.
---
 java/org/apache/tomcat/util/net/SSLUtilBase.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/SSLUtilBase.java 
b/java/org/apache/tomcat/util/net/SSLUtilBase.java
index af242bbaae..90cca75b8b 100644
--- a/java/org/apache/tomcat/util/net/SSLUtilBase.java
+++ b/java/org/apache/tomcat/util/net/SSLUtilBase.java
@@ -424,7 +424,7 @@ public abstract class SSLUtilBase implements SSLUtil {
                     throw new 
IOException(sm.getString("sslUtilBase.alias_no_key_entry", (Object) null));
                 }
             } else {
-                if (isSunMSCAPIWindowsMY(ks)) {
+                if (isSunMSCAPIWindowsMY(ks) && ks.containsAlias(keyAlias)) {
                     Certificate configuredCert = ks.isKeyEntry(keyAlias) ? 
ks.getCertificate(keyAlias) : null;
                     if (!(configuredCert instanceof X509Certificate) ||
                             !isServerAuthCapable((X509Certificate) 
configuredCert)) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to