Class OpenSSLContext
- java.lang.Object
-
- org.apache.tomcat.util.net.openssl.OpenSSLContext
-
- All Implemented Interfaces:
SSLContext
public class OpenSSLContext extends Object implements SSLContext
-
-
Constructor Summary
Constructors Constructor Description OpenSSLContext(SSLHostConfigCertificate certificate, List<String> negotiableProtocols)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCertificate(SSLHostConfigCertificate certificate)
protected static boolean
applyConf(OpenSSLConf conf, long cctx, long ctx)
protected static boolean
checkConf(OpenSSLConf conf, long cctx)
SSLEngine
createSSLEngine()
void
destroy()
protected void
finalize()
X509Certificate[]
getAcceptedIssuers()
X509Certificate[]
getCertificateChain(String alias)
String
getEnabledProtocol()
SSLSessionContext
getServerSessionContext()
SSLServerSocketFactory
getServerSocketFactory()
SSLParameters
getSupportedSSLParameters()
void
init(KeyManager[] kms, TrustManager[] tms, SecureRandom sr)
Setup the SSL_CTX.void
setEnabledProtocol(String protocol)
-
-
-
Constructor Detail
-
OpenSSLContext
public OpenSSLContext(SSLHostConfigCertificate certificate, List<String> negotiableProtocols) throws SSLException
- Throws:
SSLException
-
-
Method Detail
-
getEnabledProtocol
public String getEnabledProtocol()
-
setEnabledProtocol
public void setEnabledProtocol(String protocol)
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceSSLContext
-
checkConf
protected static boolean checkConf(OpenSSLConf conf, long cctx) throws Exception
- Throws:
Exception
-
applyConf
protected static boolean applyConf(OpenSSLConf conf, long cctx, long ctx) throws Exception
- Throws:
Exception
-
init
public void init(KeyManager[] kms, TrustManager[] tms, SecureRandom sr)
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.
-
addCertificate
public void addCertificate(SSLHostConfigCertificate certificate) throws Exception
- Throws:
Exception
-
getServerSessionContext
public SSLSessionContext getServerSessionContext()
- Specified by:
getServerSessionContext
in interfaceSSLContext
-
createSSLEngine
public SSLEngine createSSLEngine()
- Specified by:
createSSLEngine
in interfaceSSLContext
-
getServerSocketFactory
public SSLServerSocketFactory getServerSocketFactory()
- Specified by:
getServerSocketFactory
in interfaceSSLContext
-
getSupportedSSLParameters
public SSLParameters getSupportedSSLParameters()
- Specified by:
getSupportedSSLParameters
in interfaceSSLContext
-
getCertificateChain
public X509Certificate[] getCertificateChain(String alias)
- Specified by:
getCertificateChain
in interfaceSSLContext
-
getAcceptedIssuers
public X509Certificate[] getAcceptedIssuers()
- Specified by:
getAcceptedIssuers
in interfaceSSLContext
-
-