public interface SSLContextBuilder
SSLContext
.Modifier and Type | Interface and Description |
---|---|
static class |
SSLContextBuilder.ClientAuthentication
An enumeration of client authentication types
|
Modifier and Type | Method and Description |
---|---|
SSLContext |
build()
Builds an SSL context according to the configuration of this builder.
|
SSLContextBuilder |
clientAuthentication(SSLContextBuilder.ClientAuthentication type)
Specifies whether client authentication should be performed on SSL server
sockets produced by a factory created from the resulting context.
|
KeyStoreSubBuilder |
credential()
Starts a sub-builder that will produce a key store containing
a credential to be presented to the the SSL peer when negotiating secure
sessions using the resulting context.
|
KeyStoreSubBuilder |
credential(char[] keyPassword)
Starts a sub-builder that will produce a key store containing
a credential to be presented to the the SSL peer when negotiating secure
sessions using the resulting context.
|
SSLContextBuilder |
credential(KeyStore keyStore,
char[] password)
Specifies a credential will be presented to the SSL peer when negotiating
secure sessions using the resulting context.
|
SSLContextBuilder |
credential(KeyStore keyStore,
String password)
Specifies a credential will be presented to the SSL peer when negotiating
secure sessions using the resulting context.
|
KeyStoreSubBuilder |
credential(String keyPassword)
Starts a sub-builder that will produce a key store containing
a credential to be presented to the the SSL peer when negotiating secure
sessions using the resulting context.
|
SSLContextBuilder |
excludeCipherSuite(String cipherSuite)
Specifies an SSL cipher suite to exclude from the supported cipher suites
of the underlying context.
|
SSLContextBuilder |
excludeCipherSuites(String... cipherSuites)
Specifies SSL cipher suites to exclude from the supported cipher suites
of the underlying context.
|
SSLContextBuilder |
excludeProtocol(String protocol)
Specifies a secure socket transport protocol to exclude from the supported
protocols of the underlying context.
|
SSLContextBuilder |
excludeProtocols(String... protocols)
Specifies secure socket transport protocols to exclude from the supported
protocols of the underlying context.
|
SSLContextBuilder |
includeCipherSuite(String cipherSuite)
Specifies an SSL cipher suite to include among those supported by the
underlying context.
|
SSLContextBuilder |
includeCipherSuites(String... cipherSuites)
Specifies SSL cipher suites to include among those supported by the
underlying context.
|
SSLContextBuilder |
includeProtocol(String protocol)
Specifies a secure socket transport protocol to include among those
supported by the underlying context.
|
SSLContextBuilder |
includeProtocols(String... protocols)
Specifies secure socket transport protocols to include among those
supported by the underlying context.
|
KeyStoreSubBuilder |
peerTrust()
Starts a sub-builder that will produce a key store containing
trusted certificates to be used to validate the identity
of the SSL peer when negotiating secure sessions using the resulting
context.
|
SSLContextBuilder |
peerTrust(KeyStore trustStore)
Specifies a store of trusted certificates that will be used to validate
the identity of the SSL peer when negotiating secure sessions using the
resulting context.
|
SSLContextBuilder |
protocol(String protocol)
Specifies the name of the secure socket protocol this context will use.
|
SSLContextBuilder |
provider(Provider provider)
Specifies the JCA provider that will produce the SSL context.
|
SSLContextBuilder |
provider(String providerName)
Specifies the name of the JCA provider that will produce the SSL context.
|
SSLContextBuilder |
secureRandom(SecureRandom secureRandom)
Specifies a secure random number generator for use by the resulting context.
|
SSLContextBuilder protocol(String protocol)
protocol
- protocol nameSSLContextBuilder provider(String providerName)
providerName
- JCA provider nameSSLContextBuilder provider(Provider provider)
provider
- JCA providerSSLContextBuilder excludeProtocol(String protocol)
This method may be invoked repeatedly to build up the set of excluded options.
protocol
- protocol name or regular expressionSSLContextBuilder excludeProtocols(String... protocols)
This method may be invoked repeatedly to build up the set of excluded options.
protocols
- protocol names or regular expressionsSSLContextBuilder includeProtocol(String protocol)
This method may be invoked repeatedly to build up the set of included options.
protocol
- protocol name or regular expressionSSLContextBuilder includeProtocols(String... protocols)
This method may be invoked repeatedly to build up the set of included options.
protocols
- protocol names or regular expressionsSSLContextBuilder excludeCipherSuite(String cipherSuite)
This method may be invoked repeatedly to build up the set of excluded options.
cipherSuite
- cipher suite name or regular expressionSSLContextBuilder excludeCipherSuites(String... cipherSuites)
This method may be invoked repeatedly to build up the set of excluded options.
cipherSuites
- cipher suite names or regular expressionsSSLContextBuilder includeCipherSuite(String cipherSuite)
This method may be invoked repeatedly to build up the set of included options.
cipherSuite
- cipher suite name or regular expressionSSLContextBuilder includeCipherSuites(String... cipherSuites)
This method may be invoked repeatedly to build up the set of included options.
cipherSuites
- cipher suite names or regular expressionsSSLContextBuilder clientAuthentication(SSLContextBuilder.ClientAuthentication type)
type
- client authentication typeKeyStoreSubBuilder credential()
The password used to protect the credential's private key is assumed to be the same as the password used to protect the key store itself.
KeyStoreSubBuilder credential(char[] keyPassword)
keyPassword
- password used to protect the credential's private keyKeyStoreSubBuilder credential(String keyPassword)
keyPassword
- password used to protect the credential's private keySSLContextBuilder credential(KeyStore keyStore, char[] password)
keyStore
- key store containing the credential to presentpassword
- password for the private key associated with the credentialSSLContextBuilder credential(KeyStore keyStore, String password)
keyStore
- key store containing the credential to presentpassword
- password for the private key associated with the credentialKeyStoreSubBuilder peerTrust()
SSLContextBuilder peerTrust(KeyStore trustStore)
trustStore
- store of trusted certificatesSSLContextBuilder secureRandom(SecureRandom secureRandom)
secureRandom
- secure random instanceSSLContext build() throws SSLRuntimeException
SSLRuntimeException
- if the underlying JCA provider throws a
checked exceptionCopyright © 2016–2018 Carl E Harris, Jr. All rights reserved.