SSLContextUtils (Apache Commons Net 3.4 API)

org.apache.commons.net.util

## Class SSLContextUtils

- java.lang.Object
- - org.apache.commons.net.util.SSLContextUtils

-     public class SSLContextUtils
      extends Object

  General utilities for SSLContext.
  Since:
    3.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SSLContext` | `createSSLContext(String protocol, KeyManager[] keyManagers, TrustManager[] trustManagers)` Create and initialise an SSLContext.
    `static SSLContext` | `createSSLContext(String protocol, KeyManager keyManager, 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 SSLContext createSSLContext(String protocol,
                                    KeyManager keyManager,
                                    TrustManager trustManager)
                                             throws 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:
        `IOException` - this is used to wrap any `GeneralSecurityException` that occurs

    - #### createSSLContext

          public static SSLContext createSSLContext(String protocol,
                                    KeyManager[] keyManagers,
                                    TrustManager[] trustManagers)
                                             throws 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:
        `IOException` - this is used to wrap any `GeneralSecurityException` that occurs

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.