This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 8a3f669de86af436415b54f662b98116f4d00476 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Jan 3 09:14:08 2024 +0000 Only need one ECB test to ensure it is disabled --- .../group/interceptors/TestEncryptInterceptor.java | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java b/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java index 36f3b797ef..b52c1ee66c 100644 --- a/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java +++ b/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java @@ -242,21 +242,6 @@ public class TestEncryptInterceptor { return ((ValueCaptureInterceptor)dest.getPrevious()).getValue(); } - @Test - @Ignore("ECB mode isn't implemented because it's insecure") - public void testECB() throws Exception { - src.setEncryptionAlgorithm("AES/ECB/PKCS5Padding"); - src.start(Channel.SND_TX_SEQ); - dest.setEncryptionAlgorithm("AES/ECB/PKCS5Padding"); - dest.start(Channel.SND_TX_SEQ); - - String testInput = "The quick brown fox jumps over the lazy dog."; - - Assert.assertEquals("Failed in ECB mode", - testInput, - roundTrip(testInput, src, dest)); - } - @Test public void testOFB() throws Exception { src.setEncryptionAlgorithm("AES/OFB/PKCS5Padding"); @@ -307,8 +292,11 @@ public class TestEncryptInterceptor { roundTrip(testInput, src, dest)); } + /* + * ECB mode isn't supported because it's insecure. + */ @Test - public void testIllegalECB() throws Exception { + public void testECB() throws Exception { try { src.setEncryptionAlgorithm("AES/ECB/PKCS5Padding"); src.start(Channel.SND_TX_SEQ); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org