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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new e1a08dbd99d Add SSL tests with include/exclude chipher suites filter
e1a08dbd99d is described below

commit e1a08dbd99deef93e3cda8bb719512e0db81d0fd
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Aug 26 15:54:31 2024 +0200

    Add SSL tests with include/exclude chipher suites filter
---
 .../spring/boot/security/CamelSSLAutoConfigurationTest.java   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git 
a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/security/CamelSSLAutoConfigurationTest.java
 
b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/security/CamelSSLAutoConfigurationTest.java
index 4660b84c744..75f901f26d0 100644
--- 
a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/security/CamelSSLAutoConfigurationTest.java
+++ 
b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/security/CamelSSLAutoConfigurationTest.java
@@ -42,7 +42,10 @@ public class CamelSSLAutoConfigurationTest {
                         
"camel.ssl.config.key-managers.key-store.password=changeit",
                         "camel.ssl.config.key-managers.key-store.type=PKCS12",
                         
"camel.ssl.config.trust-managers.key-store.password=changeit",
-                        "camel.ssl.config.trust-managers.key-store.type=jks")
+                        "camel.ssl.config.trust-managers.key-store.type=jks",
+                        "camel.ssl.config.cipher-suites-filter.include[0]=abc",
+                        "camel.ssl.config.cipher-suites-filter.include[1]=def",
+                        "camel.ssl.config.cipher-suites-filter.exclude[0]=xxx")
                 .run(context -> {
                     GlobalSSLContextParametersSupplier supplier = context
                             .getBean(GlobalSSLContextParametersSupplier.class);
@@ -63,6 +66,12 @@ public class CamelSSLAutoConfigurationTest {
                     assertEquals("changeit", 
supplier.get().getTrustManagers().getKeyStore().getPassword());
                     assertEquals("jks", 
supplier.get().getTrustManagers().getKeyStore().getType());
 
+                    assertEquals(2, 
supplier.get().getCipherSuitesFilter().getInclude().size());
+                    assertEquals("abc", 
supplier.get().getCipherSuitesFilter().getInclude().get(0));
+                    assertEquals("def", 
supplier.get().getCipherSuitesFilter().getInclude().get(1));
+                    assertEquals(1, 
supplier.get().getCipherSuitesFilter().getExclude().size());
+                    assertEquals("xxx", 
supplier.get().getCipherSuitesFilter().getExclude().get(0));
+
                     // since no camel.ssl properties provided
                     
Assertions.assertThrows(NoSuchBeanDefinitionException.class,
                             () -> context.getBean(SSLContextParameters.class));

Reply via email to