public final class JsseSslUtils extends Object
Modifier and Type | Method and Description |
---|---|
static SSLContext |
createSSLContext(KeyManager[] keyManagers,
TrustManager[] trustManagers,
SecureRandom secureRandom,
OptionMap optionMap)
Create a new SSL context, configured from an option map and the given parameters.
|
static SSLContext |
createSSLContext(OptionMap optionMap)
Create a new SSL context, configured from an option map.
|
static SSLEngine |
createSSLEngine(SSLContext sslContext,
OptionMap optionMap,
InetSocketAddress peerAddress)
Create a new client mode SSL engine, configured from an option map.
|
public static SSLContext createSSLContext(OptionMap optionMap) throws NoSuchProviderException, NoSuchAlgorithmException, KeyManagementException
optionMap
- the SSL context optionsNoSuchProviderException
- if there is no matching providerNoSuchAlgorithmException
- if there is no matching algorithmKeyManagementException
- if the context initialization failspublic static SSLContext createSSLContext(KeyManager[] keyManagers, TrustManager[] trustManagers, SecureRandom secureRandom, OptionMap optionMap) throws NoSuchAlgorithmException, NoSuchProviderException, KeyManagementException
keyManagers
- the key managers to use, or null
to configure from the option maptrustManagers
- the trust managers to use, or null
to configure from the option mapsecureRandom
- the secure RNG to use, or null
to choose a system defaultoptionMap
- the SSL context optionsNoSuchProviderException
- if there is no matching providerNoSuchAlgorithmException
- if there is no matching algorithmKeyManagementException
- if the context initialization failspublic static SSLEngine createSSLEngine(SSLContext sslContext, OptionMap optionMap, InetSocketAddress peerAddress)
sslContext
- the SSL contextoptionMap
- the SSL optionspeerAddress
- the peer address of the connectionCopyright © 2017 JBoss by Red Hat. All rights reserved.