diff --git a/src/test/java/io/vertx/core/http/HttpTLSTest.java b/src/test/java/io/vertx/core/http/HttpTLSTest.java index 767c5c6bb57..9e298c489fd 100755 --- a/src/test/java/io/vertx/core/http/HttpTLSTest.java +++ b/src/test/java/io/vertx/core/http/HttpTLSTest.java @@ -465,6 +465,46 @@ public void testTLSv1_3OpenSSL() throws Exception { .serverEnabledSecureTransportProtocol(new String[]{"TLSv1.3"}).pass(); } + @Test + // Disable TLSv1.3 + public void testDisableTLSv1_3() throws Exception { + Assume.assumeFalse(System.getProperty("java.version").startsWith("1.8")); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll() + .clientEnabledSecureTransportProtocol(new String[]{"TLSv1.3"}) + .serverEnabledSecureTransportProtocol(new String[]{"TLSv1.2"}) + .fail(); + } + + @Test + // Disable TLSv1.3 with OpenSSL + public void testDisableTLSv1_3OpenSSL() throws Exception { + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll() + .clientEnabledSecureTransportProtocol(new String[]{"TLSv1.3"}) + .serverEnabledSecureTransportProtocol(new String[]{"TLSv1.2"}) + .serverOpenSSL() + .fail(); + } + + @Test + // Disable TLSv1.2 + public void testDisableTLSv1_2() throws Exception { + Assume.assumeFalse(System.getProperty("java.version").startsWith("1.8")); + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll() + .clientEnabledSecureTransportProtocol(new String[]{"TLSv1.2"}) + .serverEnabledSecureTransportProtocol(new String[]{"TLSv1.3"}) + .fail(); + } + + @Test + // Disable TLSv1.2 with OpenSSL + public void testDisableTLSv1_2OpenSSL() throws Exception { + testTLS(Cert.NONE, Trust.NONE, Cert.SERVER_JKS, Trust.NONE).clientTrustAll() + .clientEnabledSecureTransportProtocol(new String[]{"TLSv1.2"}) + .serverEnabledSecureTransportProtocol(new String[]{"TLSv1.3"}) + .serverOpenSSL() + .fail(); + } + // SNI tests @Test