Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2244

Allow TLS 1.2 SSL connections with MongoDB and JDK 7

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 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?

            Assignee:
            Unassigned Unassigned
            Reporter:
            emilio.scalise@mongodb.com Emilio Scalise
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: