This is an automated email from the ASF dual-hosted git repository.
markt 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 f53d368062 Fix test bug that added all SSLv3 ciphers to output
f53d368062 is described below
commit f53d368062e3beb3037849028f6ae877f7646b92
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 296cbb42a8..79d4acb121 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]