Package org.apache.tomcat.util.net.jsse
Class JSSEUtil
- java.lang.Object
-
- org.apache.tomcat.util.net.SSLUtilBase
-
- org.apache.tomcat.util.net.jsse.JSSEUtil
-
- All Implemented Interfaces:
SSLUtil
public class JSSEUtil extends SSLUtilBase
SSLUtil implementation for JSSE.- Author:
- Harish Prabandham, Costin Manolache, Stefan Freyr Stefansson, EKR, Jan Luehe
-
-
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
-
-
Constructor Summary
Constructors Constructor Description JSSEUtil(SSLHostConfigCertificate certificate)
JSSEUtil(SSLHostConfigCertificate certificate, boolean warnOnSkip)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureSessionContext(javax.net.ssl.SSLSessionContext sslSessionContext)
SSLContext
createSSLContext(java.util.List<java.lang.String> negotiableProtocols)
protected java.util.Collection<? extends java.security.cert.CRL>
getCRLs(java.lang.String crlf)
Load the collection of CRLs.protected java.util.Set<java.lang.String>
getImplementedCiphers()
protected java.util.Set<java.lang.String>
getImplementedProtocols()
javax.net.ssl.KeyManager[]
getKeyManagers()
protected Log
getLog()
protected java.security.cert.CertPathParameters
getParameters(java.lang.String crlf, java.security.KeyStore trustStore, boolean revocationEnabled)
Return the initialization parameters for the TrustManager.javax.net.ssl.TrustManager[]
getTrustManagers()
protected boolean
isTls13Available()
protected boolean
isTls13RenegAuthAvailable()
-
Methods inherited from class org.apache.tomcat.util.net.SSLUtilBase
getEnabledCiphers, getEnabledProtocols
-
-
-
-
Constructor Detail
-
JSSEUtil
public JSSEUtil(SSLHostConfigCertificate certificate)
-
JSSEUtil
public JSSEUtil(SSLHostConfigCertificate certificate, boolean warnOnSkip)
-
-
Method Detail
-
getLog
protected Log getLog()
- Specified by:
getLog
in classSSLUtilBase
-
getImplementedProtocols
protected java.util.Set<java.lang.String> getImplementedProtocols()
- Specified by:
getImplementedProtocols
in classSSLUtilBase
-
getImplementedCiphers
protected java.util.Set<java.lang.String> getImplementedCiphers()
- Specified by:
getImplementedCiphers
in classSSLUtilBase
-
isTls13Available
protected boolean isTls13Available()
- Specified by:
isTls13Available
in classSSLUtilBase
-
isTls13RenegAuthAvailable
protected boolean isTls13RenegAuthAvailable()
- Specified by:
isTls13RenegAuthAvailable
in classSSLUtilBase
-
createSSLContext
public SSLContext createSSLContext(java.util.List<java.lang.String> negotiableProtocols) throws java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchAlgorithmException
-
getKeyManagers
public javax.net.ssl.KeyManager[] getKeyManagers() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getTrustManagers
public javax.net.ssl.TrustManager[] getTrustManagers() throws java.lang.Exception
- Throws:
java.lang.Exception
-
configureSessionContext
public void configureSessionContext(javax.net.ssl.SSLSessionContext sslSessionContext)
-
getParameters
protected java.security.cert.CertPathParameters getParameters(java.lang.String crlf, java.security.KeyStore trustStore, boolean revocationEnabled) throws java.lang.Exception
Return the initialization parameters for the TrustManager. Currently, only the defaultPKIX
is supported.- Parameters:
crlf
- The path to the CRL file.trustStore
- The configured TrustStore.revocationEnabled
- Should the JSSE provider perform revocation checks? Ignored ifcrlf
is non-null. Configuration of revocation checks are expected to be via proprietary JSSE provider methods.- Returns:
- The parameters including the CRLs and TrustStore.
- Throws:
java.lang.Exception
- An error occurred
-
getCRLs
protected java.util.Collection<? extends java.security.cert.CRL> getCRLs(java.lang.String crlf) throws java.io.IOException, java.security.cert.CRLException, java.security.cert.CertificateException
Load the collection of CRLs.- Parameters:
crlf
- The path to the CRL file.- Returns:
- the CRLs collection
- Throws:
java.io.IOException
- Error reading CRL filejava.security.cert.CRLException
- CRL errorjava.security.cert.CertificateException
- Error processing certificate
-
-