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

markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new e316879750 Add OpenSSL cipher operator tests - PR #1063 by sainadh777
e316879750 is described below

commit e3168797506afd5d9f99b63754f4d0a1522175f6
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Oct 2 18:37:29 2026 +0100

    Add OpenSSL cipher operator tests - PR #1063 by sainadh777
---
 TODO.md                                            | 10 ------
 .../TestOpenSSLCipherConfigurationParser.java      | 37 +++++++++++++++++++++-
 2 files changed, 36 insertions(+), 11 deletions(-)

diff --git a/TODO.md b/TODO.md
index f5e14b1e59..d530518c83 100644
--- a/TODO.md
+++ b/TODO.md
@@ -891,16 +891,6 @@ These are bugs, correctness issues, or missing 
functionality that may affect pro
 
 ---
 
-### 81. OpenSSL Cipher Test Coverage (1 item)
-
-| # | File:Line | Description | Fix Idea | Effort | Difficulty |
-|---|-----------|-------------|----------|--------|------------|
-| 81.1 | `TestOpenSSLCipherConfigurationParser.java:497` | Individual operator 
tests missing | Add unit tests for each cipher string operator: `+`, `-`, `!`, 
`@`, colon separator, etc. | 1-2 days | Medium |
-
-**Total estimated effort: 1-2 days, Medium difficulty**
-
----
-
 ### 83. EL in JSP Escape Test (1 item)
 
 | # | File:Line | Description | Fix Idea | Effort | Difficulty |
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 cd038cfe93..2f0be3e0fe 100644
--- 
a/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java
+++ 
b/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java
@@ -440,7 +440,42 @@ public class TestOpenSSLCipherConfigurationParser {
     }
 
 
-    // TODO: Add tests for the individual operators
+    @Test
+    public void testOperatorExclude() throws Exception {
+        testSpecification("AES128:!SHA256:SHA256");
+    }
+
+
+    @Test
+    public void testOperatorDelete() throws Exception {
+        testSpecification("AES128:-SHA256:SHA256");
+    }
+
+
+    @Test
+    public void testOperatorMoveToEnd() throws Exception {
+        testSpecification("AES128:AES256:+AES128");
+    }
+
+
+    @Test
+    public void testOperatorIntersection() throws Exception {
+        testSpecification("AES128+SHA256");
+    }
+
+
+    @Test
+    public void testOperatorStrengthSort() throws Exception {
+        testSpecification("AES128:AES256:@STRENGTH");
+    }
+
+
+    @Test
+    public void testSeparators() throws Exception {
+        testSpecification("AES128:AES256");
+        testSpecification("AES128,AES256");
+        testSpecification("AES128 AES256");
+    }
 
     @Test
     public void testSpecification01() throws Exception {


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

Reply via email to