java.lang.Object
com.github.jh3nd3rs0n.jargyle.internal.net.ssl.SslContextHelper

public final class SslContextHelper extends Object
Helper class for SSLContexts.
  • Method Details

    • getSslContext

      public static SSLContext getSslContext(String protocol, KeyManager[] keyManagers, TrustManager[] trustManagers) throws NoSuchAlgorithmException, KeyManagementException
      Returns a SSLContext that implements the provided protocol and is initialized with the provided array of KeyManagers containing authentication keys and the provided array of TrustManagers containing peer authentication trust decisions.
      Parameters:
      protocol - the provided protocol
      keyManagers - the provided array of KeyManagers containing authentication keys (can be null)
      trustManagers - the provided array of TrustManagers containing peer authentication trust decisions (can be null)
      Returns:
      a SSLContext that implements the provided protocol and is initialized with the provided array of KeyManagers containing authentication keys and the provided array of TrustManagers containing peer authentication trust decisions
      Throws:
      NoSuchAlgorithmException - if the provided protocol is not supported
      KeyManagementException - if initialization of the SSLContext fails.