Class OpenSSLContext
java.lang.Object
org.apache.tomcat.util.net.openssl.OpenSSLContext
- All Implemented Interfaces:
SSLContext
-
Constructor Summary
ConstructorDescriptionOpenSSLContext
(SSLHostConfigCertificate certificate, List<String> negotiableProtocols) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCertificate
(SSLHostConfigCertificate certificate) protected static boolean
applyConf
(OpenSSLConf conf, long cctx, long ctx) protected static boolean
checkConf
(OpenSSLConf conf, long cctx) void
destroy()
getCertificateChain
(String alias) void
init
(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) Setup the SSL_CTX.void
setEnabledProtocol
(String protocol)
-
Constructor Details
-
OpenSSLContext
public OpenSSLContext(SSLHostConfigCertificate certificate, List<String> negotiableProtocols) throws SSLException - Throws:
SSLException
-
-
Method Details
-
getEnabledProtocol
-
setEnabledProtocol
-
destroy
public void destroy()- Specified by:
destroy
in interfaceSSLContext
-
checkConf
- Throws:
Exception
-
applyConf
- Throws:
Exception
-
init
public void init(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) throws KeyManagementException Setup the SSL_CTX.- Specified by:
init
in interfaceSSLContext
- Parameters:
kms
- Must contain a KeyManager of the typeOpenSSLKeyManager
tms
- Must contain a TrustManager of the typeX509TrustManager
sr
- Is not used for this implementation.- Throws:
KeyManagementException
- if an error occurs
-
addCertificate
- Throws:
Exception
-
getServerSessionContext
- Specified by:
getServerSessionContext
in interfaceSSLContext
-
createSSLEngine
- Specified by:
createSSLEngine
in interfaceSSLContext
-
getServerSocketFactory
- Specified by:
getServerSocketFactory
in interfaceSSLContext
-
getSupportedSSLParameters
- Specified by:
getSupportedSSLParameters
in interfaceSSLContext
-
getCertificateChain
- Specified by:
getCertificateChain
in interfaceSSLContext
-
getAcceptedIssuers
- Specified by:
getAcceptedIssuers
in interfaceSSLContext
-