From 3f6762ec9c2b4d631f84efc88be5880e79e365bb Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 21 Aug 2019 20:27:55 +0200 Subject: [PATCH] Use same JDK SSL test workaround when using ACCP as when just using the JDK SSL implementation (#9490) Motivation: 14607979f6db074247d764cc4583461bcd298719 added tests for using ACCP but did miss to use the same unwrapping technique of exceptions as JdkSslEngineTest. This can lead to test-failures on specific JDK versions Modifications: Add the same unwrapping code Result: No more test failures --- .../io/netty/handler/ssl/AmazonCorrettoSslEngineTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/handler/src/test/java/io/netty/handler/ssl/AmazonCorrettoSslEngineTest.java b/handler/src/test/java/io/netty/handler/ssl/AmazonCorrettoSslEngineTest.java index 8b4c8dc47b..6c7f4c1d6b 100644 --- a/handler/src/test/java/io/netty/handler/ssl/AmazonCorrettoSslEngineTest.java +++ b/handler/src/test/java/io/netty/handler/ssl/AmazonCorrettoSslEngineTest.java @@ -109,4 +109,10 @@ public class AmazonCorrettoSslEngineTest extends SSLEngineTest { @Override public void testMutualAuthValidClientCertChainTooLongFailRequireClientAuth() { } + + @Override + protected boolean mySetupMutualAuthServerIsValidException(Throwable cause) { + // TODO(scott): work around for a JDK issue. The exception should be SSLHandshakeException. + return super.mySetupMutualAuthServerIsValidException(cause) || causedBySSLException(cause); + } }