Class SSLConfig


  • public class SSLConfig
    extends java.lang.Object
    The proper SSL configuration that should be used when connecting to Dropbox API servers. This includes:
    • A custom set of trusted root SSL certificates.
    • Requiring TLS v1.0 and above (TLS v1.2 if supported)
    • A limited set of allowed SSL ciphersuites.

    getSSLSocketFactory() returns a properly configured object that you can use to create sockets.

    If you have an HttpsURLConnection, call the convenience method apply(HttpsURLConnection) (before calling URLConnection.connect()) to apply the appropriate security settings.

    • Constructor Summary

      Constructors 
      Constructor Description
      SSLConfig()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void apply​(javax.net.ssl.HttpsURLConnection conn)
      Apply security settings to an HttpsURLConnection.
      static javax.net.ssl.SSLSocketFactory getSSLSocketFactory()  
      static javax.net.ssl.X509TrustManager getTrustManager()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SSLConfig

        public SSLConfig()
    • Method Detail

      • apply

        public static void apply​(javax.net.ssl.HttpsURLConnection conn)
                          throws javax.net.ssl.SSLException
        Apply security settings to an HttpsURLConnection. Make sure you haven't called URLConnection.connect() yet.
        Throws:
        javax.net.ssl.SSLException
      • getTrustManager

        public static javax.net.ssl.X509TrustManager getTrustManager()
      • getSSLSocketFactory

        public static javax.net.ssl.SSLSocketFactory getSSLSocketFactory()