diff options
author | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2022-12-19 16:04:48 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-01-09 11:14:56 +0100 |
commit | 462fd256f43cfa3ed8b3fcff0729dbf459844172 (patch) | |
tree | 6a20bbe22cc93f0464f1596615d6681bc5104ae1 /vespa-feed-client/src/test/java | |
parent | 0796ad7fd3a85d360df2742a408545703d2c2368 (diff) |
Ensure that HTTPS clients only use allowed ciphers and protocol versions
Diffstat (limited to 'vespa-feed-client/src/test/java')
-rw-r--r-- | vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/SslContextBuilderTest.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/SslContextBuilderTest.java b/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/SslContextBuilderTest.java index f7c1b4d2b03..95952d37c3c 100644 --- a/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/SslContextBuilderTest.java +++ b/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/SslContextBuilderTest.java @@ -30,7 +30,6 @@ import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.Date; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; /** @@ -58,13 +57,13 @@ class SslContextBuilderTest { .withCaCertificates(certificateFile) .withCertificateAndKey(certificateFile, privateKeyFile) .build()); - assertEquals("TLS", sslContext.getProtocol()); + assertEquals("TLSv1.2", sslContext.getProtocol()); } @Test void successfully_constructs_sslcontext_when_no_builder_parameter_given() { SSLContext sslContext = Assertions.assertDoesNotThrow(() -> new SslContextBuilder().build()); - assertEquals("TLS", sslContext.getProtocol()); + assertEquals("TLSv1.2", sslContext.getProtocol()); } @Test @@ -73,7 +72,7 @@ class SslContextBuilderTest { new SslContextBuilder() .withCertificateAndKey(certificateFile, privateKeyFile) .build()); - assertEquals("TLS", sslContext.getProtocol()); + assertEquals("TLSv1.2", sslContext.getProtocol()); } @Test @@ -82,7 +81,7 @@ class SslContextBuilderTest { new SslContextBuilder() .withCaCertificates(certificateFile) .build()); - assertEquals("TLS", sslContext.getProtocol()); + assertEquals("TLSv1.2", sslContext.getProtocol()); } private static void writePem(Path file, String type, byte[] asn1DerEncodedObject) throws IOException { |