Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public static ConnectionFactory createConnectionFactory(final MemcachedCacheConf
// Build SSLContext
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tmf.init((KeyStore) null);
SSLContext sslContext = SSLContext.getInstance("TLS");
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(null, tmf.getTrustManagers(), null);
// Create the client in TLS mode
connectionFactoryBuilder.setSSLContext(sslContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ public String getHosts()
Assert.assertEquals(connectionFactoryDynamic.getClientMode(), ClientMode.Dynamic);
//enableTls is true so sslContext is not null
Assert.assertNotNull(connectionFactoryDynamic.getSSLContext());
// Ensure Protocol is TLSv1.2
Assert.assertEquals("TLSv1.2", connectionFactoryDynamic.getSSLContext().getProtocol());
}

@Test
Expand Down