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

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

commit f6a09b1620057f80095c2e28f3ce6cd10c1b121c
Author: remm <[email protected]>
AuthorDate: Thu Sep 18 11:16:15 2025 +0200

    Fix key type
    
    The key type used by Java is actually "ML-DSA", not "MLDSA". As a
    result, it is not possible to use the straight enum toString since '-'
    is not allowed in the name.
---
 .../apache/tomcat/util/net/SSLHostConfigCertificate.java | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java 
b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
index f41fa2d017..b92fff897b 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
@@ -319,11 +319,17 @@ public class SSLHostConfigCertificate implements 
Serializable {
         RSA(Authentication.RSA),
         DSA(Authentication.DSS, Authentication.EdDSA),
         EC(Authentication.ECDH, Authentication.ECDSA),
-        MLDSA(Authentication.MLDSA);
+        MLDSA("ML-DSA", Authentication.MLDSA);
 
+        private final String keyType;
         private final Set<Authentication> compatibleAuthentications;
 
         Type(Authentication... authentications) {
+            this(null, authentications);
+        }
+
+        Type(String keyType, Authentication... authentications) {
+            this.keyType = keyType;
             compatibleAuthentications = new HashSet<>();
             if (authentications != null) {
                 
compatibleAuthentications.addAll(Arrays.asList(authentications));
@@ -338,6 +344,14 @@ public class SSLHostConfigCertificate implements 
Serializable {
             return compatibleAuthentications.contains(scheme.getAuth());
         }
 
+        @Override
+        public String toString() {
+            if (keyType != null) {
+                return keyType;
+            }
+            return super.toString();
+        }
+
     }
 
     enum StoreType {


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

Reply via email to