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

markt-asf 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 00c2502da6 Include OpenSSL version in output since that is often key 
to any failure
00c2502da6 is described below

commit 00c2502da66561ee67a72a8a6395539bc974f8ff
Author: Mark Thomas <[email protected]>
AuthorDate: Sat Oct 3 10:55:16 2026 +0100

    Include OpenSSL version in output since that is often key to any failure
---
 .../ciphers/TestOpenSSLCipherConfigurationParser.java       | 13 ++++++-------
 .../tomcat/util/net/openssl/ciphers/TesterOpenSSL.java      |  4 ++++
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git 
a/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java
 
b/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java
index dca5a6d34c..a7ace8f22c 100644
--- 
a/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java
+++ 
b/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java
@@ -539,8 +539,8 @@ public class TestOpenSSLCipherConfigurationParser {
 
     private void testSpecificationIsEmpty(String specification) throws 
Exception {
         String openSSLCipherList = 
TesterOpenSSL.getOpenSSLCiphersAsExpression(specification);
-        Assert.assertEquals("Specification [" + specification + "] returned [" 
+ openSSLCipherList +
-                "] rather than the expected empty list", "", 
openSSLCipherList);
+        Assert.assertEquals(TesterOpenSSL.VERSION_STRING + " with 
specification [" + specification + "] returned [" +
+                openSSLCipherList + "] rather than the expected empty list", 
"", openSSLCipherList);
     }
 
 
@@ -557,9 +557,8 @@ public class TestOpenSSLCipherConfigurationParser {
         // First check the lists have the same entries
         // Order is NOT important at this point. It is checked below.
         Assert.assertEquals(
-                "Expected " + jsseCipherListFromOpenSSL.size() + " ciphers but 
got "
-                        + jsseCipherListFromParser.size() + " for the 
specification '"
-                        + specification + "'",
+                TesterOpenSSL.VERSION_STRING + " with specification [" + 
specification + "] expected " +
+                        jsseCipherListFromOpenSSL.size() + " ciphers but got " 
+ jsseCipherListFromParser.size(),
                 new TreeSet<>(jsseCipherListFromOpenSSL), new 
TreeSet<>(jsseCipherListFromParser));
 
         /*
@@ -574,8 +573,8 @@ public class TestOpenSSLCipherConfigurationParser {
          * be caught by CI and the test can be adjusted.
          */
         if (TesterOpenSSL.VERSION > 30299) {
-            Assert.assertEquals(specification, 
listToString(jsseCipherListFromOpenSSL, ','),
-                    listToString(jsseCipherListFromParser, ','));
+            Assert.assertEquals(TesterOpenSSL.VERSION_STRING + " with 
specification [" + specification + "]",
+                    listToString(jsseCipherListFromOpenSSL, ','), 
listToString(jsseCipherListFromParser, ','));
         }
     }
 
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 e0690b0281..2f06265e70 100644
--- a/test/org/apache/tomcat/util/net/openssl/ciphers/TesterOpenSSL.java
+++ b/test/org/apache/tomcat/util/net/openssl/ciphers/TesterOpenSSL.java
@@ -32,6 +32,8 @@ import org.apache.catalina.util.IOTools;
 
 public class TesterOpenSSL {
 
+    public static final String VERSION_STRING;
+
     public static final int VERSION;
 
     public static final Set<Cipher> OPENSSL_UNIMPLEMENTED_CIPHERS;
@@ -49,6 +51,8 @@ public class TesterOpenSSL {
         } catch (IOException ioe) {
             versionString = "";
         }
+        VERSION_STRING = versionString;
+
         if (versionString.startsWith("OpenSSL 4.1.")) {
             VERSION = 40100;
         } else if (versionString.startsWith("OpenSSL 4.0.")) {


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

Reply via email to