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

Allow TLS 1.2 SSL connections with MongoDB and JDK 7

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      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?

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: