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 01919f6054 Fix test bug that added all SSLv3 ciphers to output
01919f6054 is described below

commit 01919f60549c6d9f0623eb2fb565e08c194f6743
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Feb 9 17:06:23 2026 +0000

    Fix test bug that added all SSLv3 ciphers to output
---
 .../tomcat/util/net/openssl/ciphers/TesterOpenSSL.java  | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/tomcat/util/net/openssl/ciphers/TesterOpenSSL.java 
b/test/org/apache/tomcat/util/net/openssl/ciphers/TesterOpenSSL.java
index 1c1cf5a307..2e07066bab 100644
--- a/test/org/apache/tomcat/util/net/openssl/ciphers/TesterOpenSSL.java
+++ b/test/org/apache/tomcat/util/net/openssl/ciphers/TesterOpenSSL.java
@@ -244,13 +244,18 @@ public class TesterOpenSSL {
 
 
     public static Set<String> getOpenSSLCiphersAsSet(String specification) 
throws Exception {
-        String[] ciphers = 
getOpenSSLCiphersAsExpression(specification).trim().split(":");
+        String[] ciphers = getOpenSSLCiphersAsExpression(specification, 
true).trim().split(":");
         Set<String> result = new HashSet<>(Arrays.asList(ciphers));
         return result;
     }
 
 
     public static String getOpenSSLCiphersAsExpression(String specification) 
throws Exception {
+        return getOpenSSLCiphersAsExpression(specification, false);
+    }
+
+
+    public static String getOpenSSLCiphersAsExpression(String specification, 
boolean withProtocol) throws Exception {
 
         List<String> args = new ArrayList<>();
         // Standard command to list the ciphers
@@ -294,10 +299,12 @@ public class TesterOpenSSL {
                 i++;
             }
 
-            // Protocol is the second
-            int j = cipher.indexOf(' ', i);
-            name.append('+');
-            name.append(cipher.substring(i, j));
+            if (withProtocol) {
+                // Optionally include the protocol, separated with a '+'
+                int j = cipher.indexOf(' ', i);
+                name.append('+');
+                name.append(cipher.substring(i, j));
+            }
 
             // More renames
             if (OPENSSL_RENAMED_CIPHERS.containsKey(name.toString())) {


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

Reply via email to