From dcabe80a36bd9856da651e604249afae0a1623ef Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Mon, 25 Nov 2024 21:09:48 +0600 Subject: [PATCH] Test option to set SSLContext protocol --- .../redis/clients/jedis/SSLOptionsJedisTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/java/redis/clients/jedis/SSLOptionsJedisTest.java b/src/test/java/redis/clients/jedis/SSLOptionsJedisTest.java index 931b01d156..2ea1d233da 100644 --- a/src/test/java/redis/clients/jedis/SSLOptionsJedisTest.java +++ b/src/test/java/redis/clients/jedis/SSLOptionsJedisTest.java @@ -48,6 +48,19 @@ public void connectWithSslInsecure() { } } + @Test + public void connectWithSslContextProtocol() { + try (Jedis jedis = new Jedis(endpoint.getHostAndPort(), + endpoint.getClientConfigBuilder() + .sslOptions(SslOptions.builder() + .sslContextProtocol("SSL") + .truststore(new File("src/test/resources/truststore.jceks")) + .trustStoreType("jceks") + .build()).build())) { + assertEquals("PONG", jedis.ping()); + } + } + @Test public void connectWithAcl() { try (Jedis jedis = new Jedis(aclEndpoint.getHostAndPort(),