-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Java 8 will uses TLS 1.2 by default starting with JDK 8u5. This is described in the Java bug ticket JDK-7093640.
Running on JDK 7, in order to use TLS 1.2, the MongoDB Java driver should request explicitely TLS 1.2 by using code similar to this:
SSLContext context = SSLContext.getInstance("TLSv1.2");
SSLContext.setDefault(context );
In the MongoDB Java source code currently SSLContext is called in this way:
SSLEngine engine = SSLContext.getDefault().createSSLEngine(address.getHost(), address.getPort());
This will mean that TLS 1.2 will be used with JDK 8 as it's the default protocol and not used with JDK 7, as it's not the default protocol.
Is it possible to add to the MongoDB Java driver a configuration parameter to enable explicitely TLS 1.2 and request it in the SSLContext creation?
- is depended on by
-
JAVA-3386 Add Java driver example of forcing TLS 1.2
- Closed