SslContextFactory is used to configure SSL parameters to be used by server and client connectors.
Use Server to configure server-side connectors,
and Client to configure HTTP or WebSocket clients.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| public static class | |
| private static class | |
| public static class | |
| public static class | SslContextFactory.X509ExtendedKeyManagerWrapper
A wrapper that delegates to another (if not |
| public static class | SslContextFactory.X509ExtendedTrustManagerWrapper
A wrapper that delegates to another (if not |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private String | |
| private final Map | |
| private final Map | |
| private Comparator | |
| private String | |
| private boolean | |
| private boolean | |
| private String | |
| private final Set | |
| private final Set | |
| private SslContextFactory. | |
| private HostnameVerifier | |
| private final Set | |
| private final Set | |
| private String | |
| private Password | |
| private Password | |
| private String | |
| private Resource | |
| private String | |
| private final AutoLock | |
| private int | |
| private String | |
| private PKIXCertPathChecker | |
| private boolean | |
| private int | |
| private String | |
| private String[] | |
| private String[] | |
| private boolean | |
| private SSLContext | |
| private KeyStore | |
| private KeyStore | |
| private String | |
| private String | |
| private int | |
| private int | |
| private boolean | |
| private String | |
| private Password | |
| private String | |
| private Resource | |
| private String | |
| private boolean | |
| private boolean | |
| private boolean | |
| private CertificateFactory | |
| private static final String[] | DEFAULT_EXCLUDED_CIPHER_SUITES
Default Excluded Cipher Suite List |
| private static final String[] | DEFAULT_EXCLUDED_PROTOCOLS
Default Excluded Protocols List |
| public static final String | |
| public static final String | |
| private static final Pattern | |
| public static final String | KEYPASSWORD_PROPERTY
String name of key password property. |
| private static final Logger | |
| private static final Logger | |
| public static final String | PASSWORD_PROPERTY
String name of keystore password property. |
| public static final TrustManager[] | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | SslContextFactory(boolean
whether to blindly trust all certificates trustAll)Construct an instance of SslContextFactory that trusts all certificates |
| Modifier and Type | Method and Description |
|---|---|
| public void | addExcludeCipherSuites(String...
Cipher names to add to cipher)SSLEngine#setEnabledCipherSuites(String[])You can either use the exact Cipher suite name or a a regular expression. |
| public void | addExcludeProtocols(String...
Protocol name patterns to add to protocol)SSLEngine#setEnabledProtocols(String[])You can either use the exact Protocol name or a a regular expression. |
| pack-priv Map | |
| protected void | |
| protected void | |
| protected void | |
| private void | |
| protected void | |
| protected void | |
| public void | customize(SSLEngine
the SSLEngine to customize sslEngine)Customize an SslEngine instance with the configuration of this factory,
by calling |
| public SSLParameters | Returns: The passed instance of sslParams (returned as a convenience)The parameters to customize sslParams)Customize an SslParameters instance with the configuration of this factory. |
| public static int | Returns: int indicating the effective key entropy bit-length.String name of the TLS cipher suite. cipherSuite)Given the name of a TLS/SSL cipher suite, return an int representing it effective stream cipher key strength. |
| protected void | doStart()
Overrides org. |
| protected void | doStop()
Overrides org. |
| public String | dump()
Overrides org. Overrides default org. |
| public void | dump(Appendable
The appendable to dump to out, String The indent to apply after any new lines. indent)Overrides org. Implements org. |
| public Set | |
| public String | |
| public static X509Certificate[] | Returns: the certificate chainthe session to use for active peer certificates sslSession)Obtain the X509 Certificate Chain from the provided SSLSession using this
SslContextFactory's optional Provider specific |
| protected CertificateFactory | |
| protected CertStore | |
| public Comparator | |
| public String | |
| public String | |
| public String[] | Returns: The array of cipher suite name patterns to exclude fromSSLEngine#setEnabledCipherSuites(String[])
|
| public String[] | Returns: The array of protocol names to exclude fromSSLEngine#setEnabledProtocols(String[])
|
| public HostnameVerifier | Returns: the HostnameVerifier used by a client to verify host names in the server certificateGet the HostnameVerifier used by a client to verify host names in the server certificate. |
| public String[] | Returns: The array of Cipher suite names to include inSSLEngine#setEnabledCipherSuites(String[])
|
| public String[] | Returns: The array of protocol name patterns to include inSSLEngine#setEnabledProtocols(String[])
|
| public String | Returns: The algorithm name (default "SunX509") used by theKeyManagerFactory
|
| protected KeyManagerFactory | |
| public String | |
| protected KeyManager[] | |
| public KeyStore | |
| public String | |
| public String | |
| public String | |
| public Resource | |
| public String | |
| public int | Returns: Maximum number of intermediate certificates in the certification path (-1 for unlimited)
|
| public String | |
| protected Password | Returns: the Password objectthe realm realm)Returns the password object for the given realm. |
| public PKIXCertPathChecker | |
| public String | Returns: The SSL protocol (default "TLS") passed toSSLContext#getInstance(String, String)
|
| public String | |
| public int | Returns: The number of renegotiations allowed for this connection. When the limit is 0 renegotiation will be denied. If the limit is less than 0 then no limit is applied.
|
| public String | Returns: The algorithm name, which if set is passed toSecureRandom#getInstance(String) to obtain the SecureRandom instance passed to
SSLContext#init(javax.
|
| protected SecureRandom | |
| public String[] | |
| public String[] | |
| public SSLContext | |
| protected SSLContext | |
| public int | |
| public int | |
| public String | Returns: The algorithm name (default "SunX509") used by theTrustManagerFactory
|
| protected TrustManagerFactory | |
| protected TrustManager[] | |
| public KeyStore | |
| public String | |
| public String | |
| public Resource | |
| public String | |
| public X509 | |
| public X509Certificate[] | Returns: the certificate chainthe session to use for active peer certificates sslSession)Obtain the X509 Certificate Chain from the provided SSLSession using this
SslContextFactory's optional Provider specific |
| private static X509Certificate[] | |
| pack-priv Map | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | Returns: True if all certificates should be trusted if there is no KeyStore or TrustStore
|
| public boolean | |
| public boolean | |
| public boolean | |
| private void | |
| protected Collection | |
| protected KeyStore | Returns: the key store instancethe resource to load the keystore from resource)Override this method to provide alternate way to load a keystore. |
| protected KeyStore | Returns: the key store instancethe resource to load the truststore from resource)Override this method to provide alternate way to load a truststore. |
| public Password | Returns: the new Password objectthe password string password)Creates a new Password object. |
| protected PKIXBuilderParameters | |
| public SSLEngine | Returns: a new, "scratch"SSLEngineFactory method for "scratch" |
| public SSLEngine | Returns: a newSSLEnginethe remote host host, int the remote port port)General purpose factory method for creating |
| public SSLEngine | Returns: a newSSLEnginethe remote peer address address)Server-side only factory method for creating |
| public SSLServerSocket | |
| public SSLSocket | |
| protected void | processIncludeCipherSuites(String[] supportedCipherSuites, List<String> selectedCiphers)
Deprecated
no replacement
|
| private List | |
| public void | |
| protected void | |
| protected void | selectCipherSuites(String[]
Array of enabled cipher suites enabledCipherSuites, String[] Array of supported cipher suites supportedCipherSuites)Select cipher suites to be used by the connector based on configured inclusion and exclusion lists as well as enabled and supported cipher suite lists. |
| pack-priv List | |
| public void | selectProtocols(String[]
Array of enabled protocols enabledProtocols, String[] Array of supported protocols supportedProtocols)Select protocols to be used by the connector based on configured inclusion and exclusion lists as well as enabled and supported protocols. |
| public void | setCertAlias(String
Alias of SSL certificate for the connector certAlias)Set the default certificate Alias. |
| public void | |
| public void | |
| public void | setEnableCRLDP(boolean
true - turn on, false - turns off enableCRLDP)Enables CRL Distribution Points Support |
| public void | setEnableOCSP(boolean
true - turn on, false - turn off enableOCSP)Enables On-Line Certificate Status Protocol support |
| public void | setEndpointIdentificationAlgorithm(String
Set the endpointIdentificationAlgorithm endpointIdentificationAlgorithm)When set to "HTTPS" hostname verification will be enabled. |
| public void | setExcludeCipherSuites(String...
The array of cipher suite names to exclude from
cipherSuites)SSLEngine#setEnabledCipherSuites(String[])You can either use the exact Cipher suite name or a a regular expression. |
| public void | setExcludeProtocols(String...
The array of protocol names to exclude from
protocols)SSLEngine#setEnabledProtocols(String[])You can either use the exact Protocol name or a a regular expression. |
| public void | setHostnameVerifier(HostnameVerifier
the HostnameVerifier used by a client to verify host names in the server certificate hostnameVerifier)Sets a |
| public void | setIncludeCipherSuites(String...
The array of cipher suite names to include in
cipherSuites)SSLEngine#setEnabledCipherSuites(String[])You can either use the exact Cipher suite name or a a regular expression. |
| public void | setIncludeProtocols(String...
The array of protocol name patterns to include in
protocols)SSLEngine#setEnabledProtocols(String[])You can either use the exact Protocol name or a a regular expression. |
| public void | setKeyManagerFactoryAlgorithm(String
The algorithm name (default "SunX509") used by the algorithm)KeyManagerFactory
|
| public void | setKeyManagerPassword(String
The password (if any) for the specific key within the key store.
If null is passed and the org.eclipse.jetty.ssl.keypassword system property is set,
then the password)getPassword(String) is used to
obtain a password from the org.eclipse.jetty.ssl.keypassword system property.
|
| public void | |
| public void | setKeyStorePassword(String
The password for the key store. If null is passed and
a keystore is set, then
the password)getPassword(String) is used to
obtain a password either from the org.eclipse.jetty.ssl.password
system property.
|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setMaxCertPathLength(int
maximum number of intermediate certificates in
the certification path (-1 for unlimited) maxCertPathLength)
|
| public void | setOcspResponderURL(String
location of the OCSP Responder ocspResponderURL)Set the location of the OCSP Responder. |
| public void | |
| public void | setProtocol(String
The SSL protocol (default "TLS") passed to
protocol)SSLContext#getInstance(String, String)
|
| public void | setProvider(String
The optional Security Provider name. provider)Set the optional Security Provider name. |
| public void | setRenegotiationAllowed(boolean
whether TLS renegotiation is allowed renegotiationAllowed)Set whether TLS renegotiation is allowed. |
| public void | setRenegotiationLimit(int
The number of renegotions allowed for this connection.
When the limit is 0 renegotiation will be denied. If the limit is less than 0 then no limit is applied.
Default 5. renegotiationLimit)
|
| public void | setSecureRandomAlgorithm(String
The algorithm name, which if set is passed to
algorithm)SecureRandom#getInstance(String) to obtain the SecureRandom instance passed to
SSLContext#init(javax.
|
| public void | setSessionCachingEnabled(boolean
the value of the flag enableSessionCaching)Set the flag to enable SSL Session caching. |
| public void | |
| public void | setSslSessionCacheSize(int
SSL session cache size to set. A value of -1 (default) uses
the JVM default, 0 means unlimited and positive number is a max size. sslSessionCacheSize)Set SSL session cache size. |
| public void | setSslSessionTimeout(int
SSL session timeout to set in seconds. A value of -1 (default) uses
the JVM default, 0 means unlimited and positive number is a timeout in seconds. sslSessionTimeout)Set SSL session timeout. |
| public void | setTrustAll(boolean
True if all certificates should be trusted if there is no KeyStore or TrustStore trustAll)
|
| public void | setTrustManagerFactoryAlgorithm(String
The algorithm name (default "SunX509") used by the algorithm)TrustManagerFactory
Use the string "TrustAll" to install a trust manager that trusts all.
|
| public void | |
| public void | setTrustStorePassword(String
The password for the truststore. If null is passed then
the password)getPassword(String) is used to
obtain a password from the org.eclipse.jetty.ssl.password
system property.
|
| public void | |
| public void | |
| public void | setTrustStoreResource(Resource
the trust store resource to set resource)Set the trust store resource. |
| public void | |
| public void | |
| public void | setValidateCerts(boolean
true if SSL certificates have to be validated validateCerts)Set true if SSL certificates have to be validated. |
| public void | setValidatePeerCerts(boolean
true if SSL certificates of the peer have to be validated validatePeerCerts)Set true if SSL certificates of the peer have to be validated. |
| public String | toString()
Overrides org. |
| private void | |
| public void | |
| pack-priv Map |