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