Class SSLContextUtils


  • public class SSLContextUtils
    extends java.lang.Object
    General utilities for SSLContext.
    Since:
    3.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.net.ssl.SSLContext createSSLContext​(java.lang.String protocol, javax.net.ssl.KeyManager[] keyManagers, javax.net.ssl.TrustManager[] trustManagers)
      Create and initialise an SSLContext.
      static javax.net.ssl.SSLContext createSSLContext​(java.lang.String protocol, javax.net.ssl.KeyManager keyManager, javax.net.ssl.TrustManager trustManager)
      Create and initialise an SSLContext.
      • Methods inherited from class java.lang.Object

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

      • createSSLContext

        public static javax.net.ssl.SSLContext createSSLContext​(java.lang.String protocol,
                                                                javax.net.ssl.KeyManager keyManager,
                                                                javax.net.ssl.TrustManager trustManager)
                                                         throws java.io.IOException
        Create and initialise an SSLContext.
        Parameters:
        protocol - the protocol used to instatiate the context
        keyManager - the key manager, may be null
        trustManager - the trust manager, may be null
        Returns:
        the initialised context.
        Throws:
        java.io.IOException - this is used to wrap any GeneralSecurityException that occurs
      • createSSLContext

        public static javax.net.ssl.SSLContext createSSLContext​(java.lang.String protocol,
                                                                javax.net.ssl.KeyManager[] keyManagers,
                                                                javax.net.ssl.TrustManager[] trustManagers)
                                                         throws java.io.IOException
        Create and initialise an SSLContext.
        Parameters:
        protocol - the protocol used to instatiate the context
        keyManagers - the array of key managers, may be null but array entries must not be null
        trustManagers - the array of trust managers, may be null but array entries must not be null
        Returns:
        the initialised context.
        Throws:
        java.io.IOException - this is used to wrap any GeneralSecurityException that occurs