Skip to content

Commit

Permalink
Issue #5684 - Disabled TLSv1.3 tests on windows
Browse files Browse the repository at this point in the history
If we restrict to TLSv1.2 this passes.

But on TLSv1.3 is a behavior differences between Linux and Windows.

On Linux TLSv.13 on client side will always return a
javax.net.ssl.SSLHandshakeException in those test cases that expect it.

However, on Windows, Only the TLSv1.2 implementation will return a javax.net.ssl.SSLHandshakeException,

All other TLS versions will result in a
javax.net.ssl.SSLException: Software caused connection abort: recv failed

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Aug 2, 2021
1 parent 18f32da commit 60bfc75
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

import static org.hamcrest.MatcherAssert.assertThat;
Expand Down Expand Up @@ -143,7 +144,7 @@ protected void start(Consumer<SslContextFactory.Server> sslConfig) throws Except
// Only the TLSv1.2 implementation will return a javax.net.ssl.SSLHandshakeException,
// all other TLS versions will result in a
// javax.net.ssl.SSLException: Software caused connection abort: recv failed
sslContextFactory.setIncludeProtocols("TLSv1.2");
// sslContextFactory.setIncludeProtocols("TLSv1.2");
}
sslContextFactory.setKeyStorePassword("storepwd");
sslConfig.accept(sslContextFactory);
Expand Down Expand Up @@ -272,6 +273,7 @@ public void testBadSNIConnect() throws Exception
assertThat(response, Matchers.containsString("Host does not match SNI"));
}

@DisabledOnOs(value = OS.WINDOWS, disabledReason = "TLSv1.3 behavior differences between Linux and Windows")
@Test
public void testWrongSNIRejectedConnection() throws Exception
{
Expand Down Expand Up @@ -316,6 +318,7 @@ public void testWrongSNIRejectedBadRequest() throws Exception
assertThat(response.getStatus(), is(400));
}

@DisabledOnOs(value = OS.WINDOWS, disabledReason = "TLSv1.3 behavior differences between Linux and Windows")
@Test
public void testWrongSNIRejectedFunction() throws Exception
{
Expand Down Expand Up @@ -346,6 +349,7 @@ public void testWrongSNIRejectedFunction() throws Exception
assertThat(response.getStatus(), is(400));
}

@DisabledOnOs(value = OS.WINDOWS, disabledReason = "TLSv1.3 behavior differences between Linux and Windows")
@Test
public void testWrongSNIRejectedConnectionWithNonSNIKeystore() throws Exception
{
Expand Down

0 comments on commit 60bfc75

Please sign in to comment.