Top Description Constructors Methods
org.xnio.ssl

public final Class JsseSslUtils

extends Object
Class Inheritance
Static Imports
org.xnio._private.Messages.msg

Utility methods for creating JSSE constructs and configuring them via XNIO option maps.
Author
David M. Lloyd

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SSLContext

Returns:

a new context
createSSLContext
(OptionMap
the SSL context options
optionMap
)

Create a new SSL context, configured from an option map.

public static SSLContext

Returns:

a new context
createSSLContext
(KeyManager[]
the key managers to use, or null to configure from the option map
keyManagers
,
TrustManager[]
the trust managers to use, or null to configure from the option map
trustManagers
,
SecureRandom
the secure RNG to use, or null to choose a system default
secureRandom
,
OptionMap
the SSL context options
optionMap
)

Create a new SSL context, configured from an option map and the given parameters.

public static SSLEngine

Returns:

the configured SSL engine
createSSLEngine
(SSLContext
the SSL context
sslContext
,
OptionMap
the SSL options
optionMap
,
InetSocketAddress
the peer address of the connection
peerAddress
)

Create a new client mode SSL engine, configured from an option map.

private static <T> T
instantiate(Class<T> clazz)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JsseSslUtilsback to summary
private JsseSslUtils()

Method Detail

createSSLContextback to summary
public static SSLContext createSSLContext(OptionMap optionMap) throws NoSuchProviderException, NoSuchAlgorithmException, KeyManagementException

Create a new SSL context, configured from an option map.

Parameters
optionMap:OptionMap

the SSL context options

Returns:SSLContext

a new context

Exceptions
NoSuchProviderException:
if there is no matching provider
NoSuchAlgorithmException:
if there is no matching algorithm
KeyManagementException:
if the context initialization fails
createSSLContextback to summary
public static SSLContext createSSLContext(KeyManager[] keyManagers, TrustManager[] trustManagers, SecureRandom secureRandom, OptionMap optionMap) throws NoSuchAlgorithmException, NoSuchProviderException, KeyManagementException

Create a new SSL context, configured from an option map and the given parameters.

Parameters
keyManagers:KeyManager[]

the key managers to use, or null to configure from the option map

trustManagers:TrustManager[]

the trust managers to use, or null to configure from the option map

secureRandom:SecureRandom

the secure RNG to use, or null to choose a system default

optionMap:OptionMap

the SSL context options

Returns:SSLContext

a new context

Exceptions
NoSuchAlgorithmException:
if there is no matching algorithm
NoSuchProviderException:
if there is no matching provider
KeyManagementException:
if the context initialization fails
createSSLEngineback to summary
public static SSLEngine createSSLEngine(SSLContext sslContext, OptionMap optionMap, InetSocketAddress peerAddress)

Create a new client mode SSL engine, configured from an option map.

Parameters
sslContext:SSLContext

the SSL context

optionMap:OptionMap

the SSL options

peerAddress:InetSocketAddress

the peer address of the connection

Returns:SSLEngine

the configured SSL engine

instantiateback to summary
private static <T> T instantiate(Class<T> clazz)
Annotations
@SuppressWarnings:TryWithIdenticalCatches