Methods Summary |
---|
public final javax.net.ssl.SSLEngine | createSSLEngine()Creates an {@code SSLEngine} instance from this context.
return spiImpl.engineCreateSSLEngine();
|
public final javax.net.ssl.SSLEngine | createSSLEngine(java.lang.String peerHost, int peerPort)Creates an {@code SSLEngine} instance from this context with the
specified hostname and port.
return spiImpl.engineCreateSSLEngine(peerHost, peerPort);
|
public final javax.net.ssl.SSLSessionContext | getClientSessionContext()Returns the SSL session context that encapsulates the set of SSL sessions
that can be used for handshake of client-side SSL sockets.
return spiImpl.engineGetClientSessionContext();
|
public static javax.net.ssl.SSLContext | getInstance(java.lang.String protocol)Creates a new {@code SSLContext} instance for the specified protocol.
if (protocol == null) {
throw new NullPointerException("protocol is null");
}
synchronized (engine) {
engine.getInstance(protocol, null);
return new SSLContext((SSLContextSpi) engine.spi, engine.provider,
protocol);
}
|
public static javax.net.ssl.SSLContext | getInstance(java.lang.String protocol, java.lang.String provider)Creates a new {@code SSLContext} instance for the specified protocol from
the specified provider.
if (provider == null) {
throw new IllegalArgumentException("Provider is null");
}
if (provider.length() == 0) {
throw new IllegalArgumentException("Provider is empty");
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
throw new NoSuchProviderException(provider);
}
return getInstance(protocol, impProvider);
|
public static javax.net.ssl.SSLContext | getInstance(java.lang.String protocol, java.security.Provider provider)Creates a new {@code SSLContext} instance for the specified protocol from
the specified provider.
if (provider == null) {
throw new IllegalArgumentException("provider is null");
}
if (protocol == null) {
throw new NullPointerException("protocol is null");
}
synchronized (engine) {
engine.getInstance(protocol, provider, null);
return new SSLContext((SSLContextSpi) engine.spi, provider, protocol);
}
|
public final java.lang.String | getProtocol()Returns the name of the secure socket protocol of this instance.
return protocol;
|
public final java.security.Provider | getProvider()Returns the provider of this {@code SSLContext} instance.
return provider;
|
public final javax.net.ssl.SSLSessionContext | getServerSessionContext()Returns the SSL session context that encapsulates the set of SSL sessions
that can be used for handshake of server-side SSL sockets.
return spiImpl.engineGetServerSessionContext();
|
public final javax.net.ssl.SSLServerSocketFactory | getServerSocketFactory()Returns a server socket factory for this instance.
return spiImpl.engineGetServerSocketFactory();
|
public final javax.net.ssl.SSLSocketFactory | getSocketFactory()Returns a socket factory for this instance.
return spiImpl.engineGetSocketFactory();
|
public final void | init(javax.net.ssl.KeyManager[] km, javax.net.ssl.TrustManager[] tm, java.security.SecureRandom sr)Initializes this {@code SSLContext} instance. All of the arguments are
optional, and the security providers will be searched for the required
implementations of the needed algorithms.
spiImpl.engineInit(km, tm, sr);
|