Class SSLContextBuilder


  • public class SSLContextBuilder
    extends java.lang.Object
    Builds a new instance of SSLContext object from given key store and trust store parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      javax.net.ssl.SSLContext build​(java.io.File keyStoreFile, java.lang.String keyStorePassword, java.lang.String keyStoreType, java.io.File trustStoreFile, java.lang.String trustStorePassword)
      The keyStoreFile takes a File object of p12 or jks file depends on keyStoreType The trustStoreFile always takes a File object of JKS file.
      javax.net.ssl.SSLContext build​(java.lang.String keyStoreData, java.lang.String keyStorePassword)
      Deprecated.
      Builds from key store file instead of raw key store data.
      • Methods inherited from class java.lang.Object

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

      • SSLContextBuilder

        public SSLContextBuilder()
    • Method Detail

      • build

        @Deprecated
        public javax.net.ssl.SSLContext build​(java.lang.String keyStoreData,
                                              java.lang.String keyStorePassword)
                                       throws java.lang.Exception
        Deprecated.
        Builds from key store file instead of raw key store data.
        This constructor uses keyStoreData for both keyStore and trustStore. It only supports base64 encoded jks format keyStore.
        Throws:
        java.lang.Exception
      • build

        public javax.net.ssl.SSLContext build​(java.io.File keyStoreFile,
                                              java.lang.String keyStorePassword,
                                              java.lang.String keyStoreType,
                                              java.io.File trustStoreFile,
                                              java.lang.String trustStorePassword)
                                       throws java.lang.Exception
        The keyStoreFile takes a File object of p12 or jks file depends on keyStoreType The trustStoreFile always takes a File object of JKS file.
        Throws:
        java.lang.Exception