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 892761cc0c Undo readability change that created infinite loop. Add 
comment instead.
892761cc0c is described below

commit 892761cc0c65d14c3b8f31ab931eef2b417c3acc
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jun 3 11:55:40 2026 +0100

    Undo readability change that created infinite loop. Add comment instead.
---
 .../net/openssl/ciphers/OpenSSLCipherConfigurationParser.java    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
 
b/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
index adc72ec4bf..97280c4edd 100644
--- 
a/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
+++ 
b/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
@@ -493,6 +493,13 @@ public class OpenSSLCipherConfigurationParser {
         addListAlias(aSRP, filterByAuthentication(allCiphers, 
Collections.singleton(Authentication.SRP)));
         addListAlias(kSRP, filterByKeyExchange(allCiphers, 
Collections.singleton(KeyExchange.SRP)));
         addListAlias(SRP, filterByKeyExchange(allCiphers, 
Collections.singleton(KeyExchange.SRP)));
+
+        /*
+         * initialized needs to be set to true here to avoid an infinite loop 
as parse(String) will call init() if
+         * initialized is not true.
+         */
+        initialized = true;
+
         addListAlias(DEFAULT, 
parse("ALL:!eNULL:!aNULL:!DES:!RC2:!RC4:!DSS:!SEED:!IDEA:!CAMELLIA:!AESCCM:!3DES:!ARIA"));
         // COMPLEMENTOFDEFAULT is also not exactly as defined by the docs
         LinkedHashSet<Cipher> complementOfDefault =
@@ -511,8 +518,6 @@ public class OpenSSLCipherConfigurationParser {
         complementOfDefault.addAll(aliases.get(ARIA));
         defaultSort(complementOfDefault);
         addListAlias(COMPLEMENTOFDEFAULT, complementOfDefault);
-
-        initialized = true;
     }
 
     static void addListAlias(String alias, Set<Cipher> ciphers) {


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

Reply via email to