Class OpenSSLUtil
- java.lang.Object
-
- org.apache.tomcat.util.net.SSLUtilBase
-
- org.apache.tomcat.util.net.openssl.OpenSSLUtil
-
- All Implemented Interfaces:
SSLUtil
public class OpenSSLUtil extends SSLUtilBase
OpenSSL implementation of SSL utility operations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tomcat.util.net.SSLUtil
SSLUtil.ProtocolInfo
-
-
Field Summary
-
Fields inherited from class org.apache.tomcat.util.net.SSLUtilBase
certificate, DEFAULT_KEY_ALIAS, sslHostConfig
-
-
Constructor Summary
Constructors Constructor Description OpenSSLUtil(SSLHostConfigCertificate certificate)Constructs an OpenSSLUtil for the given certificate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static javax.net.ssl.X509KeyManagerchooseKeyManager(javax.net.ssl.KeyManager[] managers)Deprecated.static javax.net.ssl.X509KeyManagerchooseKeyManager(javax.net.ssl.KeyManager[] managers, boolean throwOnMissing)Chooses an X509 key manager from the array of key managers.SSLContextcreateSSLContextInternal(java.util.List<java.lang.String> negotiableProtocols)Creates an SSL context with the given negotiable protocols.protected java.util.Set<java.lang.String>getImplementedCiphers()Returns the set of implemented SSL/TLS ciphers.protected java.util.Set<java.lang.String>getImplementedProtocols()Returns the set of implemented SSL/TLS protocols.javax.net.ssl.KeyManager[]getKeyManagers()Returns the key managers.protected LoggetLog()Returns the log for this utility.protected booleanisTls13RenegAuthAvailable()Returns whether TLS 1.3 renegotiation authentication is available.-
Methods inherited from class org.apache.tomcat.util.net.SSLUtilBase
configureSessionContext, createSSLContext, getCRLs, getEnabledCiphers, getEnabledProtocols, getParameters, getTrustManagers
-
-
-
-
Constructor Detail
-
OpenSSLUtil
public OpenSSLUtil(SSLHostConfigCertificate certificate)
Constructs an OpenSSLUtil for the given certificate.- Parameters:
certificate- The SSL host config certificate
-
-
Method Detail
-
getLog
protected Log getLog()
Description copied from class:SSLUtilBaseReturns the log for this utility.- Specified by:
getLogin classSSLUtilBase- Returns:
- the log
-
getImplementedProtocols
protected java.util.Set<java.lang.String> getImplementedProtocols()
Description copied from class:SSLUtilBaseReturns the set of implemented SSL/TLS protocols.- Specified by:
getImplementedProtocolsin classSSLUtilBase- Returns:
- the implemented protocols
-
getImplementedCiphers
protected java.util.Set<java.lang.String> getImplementedCiphers()
Description copied from class:SSLUtilBaseReturns the set of implemented SSL/TLS ciphers.- Specified by:
getImplementedCiphersin classSSLUtilBase- Returns:
- the implemented ciphers
-
isTls13RenegAuthAvailable
protected boolean isTls13RenegAuthAvailable()
Description copied from class:SSLUtilBaseReturns whether TLS 1.3 renegotiation authentication is available.- Specified by:
isTls13RenegAuthAvailablein classSSLUtilBase- Returns:
trueif TLS 1.3 renegotiation authentication is available
-
createSSLContextInternal
public SSLContext createSSLContextInternal(java.util.List<java.lang.String> negotiableProtocols) throws java.lang.Exception
Description copied from class:SSLUtilBaseCreates an SSL context with the given negotiable protocols.- Specified by:
createSSLContextInternalin classSSLUtilBase- Parameters:
negotiableProtocols- The negotiable protocols- Returns:
- the SSL context
- Throws:
java.lang.Exception- if creation fails
-
chooseKeyManager
@Deprecated public static javax.net.ssl.X509KeyManager chooseKeyManager(javax.net.ssl.KeyManager[] managers) throws java.lang.ExceptionDeprecated.- Throws:
java.lang.Exception
-
chooseKeyManager
public static javax.net.ssl.X509KeyManager chooseKeyManager(javax.net.ssl.KeyManager[] managers, boolean throwOnMissing) throws java.lang.ExceptionChooses an X509 key manager from the array of key managers.- Parameters:
managers- The key managers to choose fromthrowOnMissing- Whether to throw if no key manager is found- Returns:
- The chosen X509 key manager
- Throws:
java.lang.Exception- if no suitable key manager is found and throwOnMissing is true
-
getKeyManagers
public javax.net.ssl.KeyManager[] getKeyManagers() throws java.lang.ExceptionDescription copied from interface:SSLUtilReturns the key managers.- Specified by:
getKeyManagersin interfaceSSLUtil- Overrides:
getKeyManagersin classSSLUtilBase- Returns:
- The key managers
- Throws:
java.lang.Exception- if an error occurs
-
-