Class SslContextHelper
java.lang.Object
com.github.jh3nd3rs0n.jargyle.internal.net.ssl.SslContextHelper
Helper class for
SSLContexts.-
Method Summary
Modifier and TypeMethodDescriptionstatic SSLContextgetSslContext(String protocol, KeyManager[] keyManagers, TrustManager[] trustManagers) Returns aSSLContextthat implements the provided protocol and is initialized with the provided array ofKeyManagers containing authentication keys and the provided array ofTrustManagers containing peer authentication trust decisions.
-
Method Details
-
getSslContext
public static SSLContext getSslContext(String protocol, KeyManager[] keyManagers, TrustManager[] trustManagers) throws NoSuchAlgorithmException, KeyManagementException Returns aSSLContextthat implements the provided protocol and is initialized with the provided array ofKeyManagers containing authentication keys and the provided array ofTrustManagers containing peer authentication trust decisions.- Parameters:
protocol- the provided protocolkeyManagers- the provided array ofKeyManagers containing authentication keys (can benull)trustManagers- the provided array ofTrustManagers containing peer authentication trust decisions (can benull)- Returns:
- a
SSLContextthat implements the provided protocol and is initialized with the provided array ofKeyManagers containing authentication keys and the provided array ofTrustManagers containing peer authentication trust decisions - Throws:
NoSuchAlgorithmException- if the provided protocol is not supportedKeyManagementException- if initialization of theSSLContextfails.
-