Top Inners Fields Constructors Methods
org.apache.tomcat.util.net.openssl

public Class OpenSSLContext

extends Object
implements SSLContext
Class Inheritance
All Implemented Interfaces
org.apache.tomcat.util.net.SSLContext
Imports
java.io.BufferedReader, .FileInputStream, .InputStreamReader, java.lang.ref.Cleaner, .Cleaner.Cleanable, java.nio.charset.StandardCharsets, java.security.PrivateKey, .SecureRandom, java.security.cert.CertificateException, .CertificateFactory, .X509Certificate, java.util.ArrayList, .Arrays, .Base64, .Iterator, .List, javax.net.ssl.KeyManager, .SSLEngine, .SSLException, .SSLParameters, .SSLServerSocketFactory, .SSLSessionContext, .TrustManager, .X509KeyManager, .X509TrustManager, org.apache.juli.logging.Log, .LogFactory, org.apache.tomcat.jni.CertificateVerifier, .Pool, .SSL, .SSLConf, .SSLContext, org.apache.tomcat.util.net.Constants, .SSLHostConfig, .SSLHostConfig.CertificateVerification, .SSLHostConfigCertificate, .SSLHostConfigCertificate.Type, .SSLUtilBase, org.apache.tomcat.util.res.StringManager

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final String
private final SSLHostConfigCertificate
private final Cleaner.Cleanable
private static final Cleaner
private static final String
private String
private static final Object
private boolean
private static final Log
private final List<String>
private OpenSSLSessionContext
private static final StringManager
private final SSLHostConfig
private final OpenSSLContext.OpenSSLState
pack-priv static final CertificateFactory
private X509TrustManager

Constructor Summary

AccessConstructor and Description
public
OpenSSLContext(SSLHostConfigCertificate certificate, List<String> negotiableProtocols)

Method Summary

Modifier and TypeMethod and Description
public void
protected static boolean
applyConf(OpenSSLConf conf, long cctx, long ctx)

private static X509Certificate[]
certificates(byte[][] chain)

protected static boolean
checkConf(OpenSSLConf conf, long cctx)

private static X509TrustManager
public SSLEngine
public void
private static String
public X509Certificate[]
public X509Certificate[]
private static int
public String
public SSLSessionContext
public SSLServerSocketFactory
pack-priv long
public SSLParameters
public void
init(KeyManager[]
Must contain a KeyManager of the type OpenSSLKeyManager
kms
,
TrustManager[]
Must contain a TrustManager of the type X509TrustManager
tms
,
SecureRandom
Is not used for this implementation.
sr
)

Implements org.apache.tomcat.util.net.SSLContext.init.

Setup the SSL_CTX.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BEGIN_KEYback to summary
private static final String BEGIN_KEY
certificateback to summary
private final SSLHostConfigCertificate certificate
cleanableback to summary
private final Cleaner.Cleanable cleanable
cleanerback to summary
private static final Cleaner cleaner
defaultProtocolback to summary
private static final String defaultProtocol
enabledProtocolback to summary
private String enabledProtocol
END_KEYback to summary
private static final Object END_KEY
initializedback to summary
private boolean initialized
logback to summary
private static final Log log
negotiableProtocolsback to summary
private final List<String> negotiableProtocols
sessionContextback to summary
private OpenSSLSessionContext sessionContext
smback to summary
private static final StringManager sm
sslHostConfigback to summary
private final SSLHostConfig sslHostConfig
stateback to summary
private final OpenSSLContext.OpenSSLState state
X509_CERT_FACTORYback to summary
pack-priv static final CertificateFactory X509_CERT_FACTORY
x509TrustManagerback to summary
private X509TrustManager x509TrustManager

Constructor Detail

OpenSSLContextback to summary
public OpenSSLContext(SSLHostConfigCertificate certificate, List<String> negotiableProtocols) throws SSLException

Method Detail

addCertificateback to summary
public void addCertificate(SSLHostConfigCertificate certificate) throws Exception
applyConfback to summary
protected static boolean applyConf(OpenSSLConf conf, long cctx, long ctx) throws Exception
certificatesback to summary
private static X509Certificate[] certificates(byte[][] chain)
checkConfback to summary
protected static boolean checkConf(OpenSSLConf conf, long cctx) throws Exception
chooseTrustManagerback to summary
private static X509TrustManager chooseTrustManager(TrustManager[] managers)
createSSLEngineback to summary
public SSLEngine createSSLEngine()

Implements org.apache.tomcat.util.net.SSLContext.createSSLEngine.

Annotations
@Override
destroyback to summary
public void destroy()

Implements org.apache.tomcat.util.net.SSLContext.destroy.

Annotations
@Override
findAliasback to summary
private static String findAlias(X509KeyManager keyManager, SSLHostConfigCertificate certificate)
getAcceptedIssuersback to summary
public X509Certificate[] getAcceptedIssuers()

Implements org.apache.tomcat.util.net.SSLContext.getAcceptedIssuers.

Annotations
@Override
getCertificateChainback to summary
public X509Certificate[] getCertificateChain(String alias)

Implements org.apache.tomcat.util.net.SSLContext.getCertificateChain.

Annotations
@Override
getCertificateIndexback to summary
private static int getCertificateIndex(SSLHostConfigCertificate certificate)
getEnabledProtocolback to summary
public String getEnabledProtocol()
getServerSessionContextback to summary
public SSLSessionContext getServerSessionContext()

Implements org.apache.tomcat.util.net.SSLContext.getServerSessionContext.

Annotations
@Override
getServerSocketFactoryback to summary
public SSLServerSocketFactory getServerSocketFactory()

Implements org.apache.tomcat.util.net.SSLContext.getServerSocketFactory.

Annotations
@Override
getSSLContextIDback to summary
pack-priv long getSSLContextID()
getSupportedSSLParametersback to summary
public SSLParameters getSupportedSSLParameters()

Implements org.apache.tomcat.util.net.SSLContext.getSupportedSSLParameters.

Annotations
@Override
initback to summary
public void init(KeyManager[] kms, TrustManager[] tms, SecureRandom sr)

Implements org.apache.tomcat.util.net.SSLContext.init.

Setup the SSL_CTX.

Parameters
kms:KeyManager[]

Must contain a KeyManager of the type OpenSSLKeyManager

tms:TrustManager[]

Must contain a TrustManager of the type X509TrustManager

sr:SecureRandom

Is not used for this implementation.

Annotations
@Override
setEnabledProtocolback to summary
public void setEnabledProtocol(String protocol)
org.apache.tomcat.util.net.openssl back to summary

private Class OpenSSLContext.OpenSSLState

extends Object
implements Runnable
Class Inheritance
  • java.lang.Object
  • org.apache.tomcat.util.net.openssl.OpenSSLContext.OpenSSLState
All Implemented Interfaces
java.lang.Runnable

Field Summary

Modifier and TypeField and Description
pack-priv final long
pack-priv final long
pack-priv final long

Constructor Summary

AccessConstructor and Description
private
OpenSSLState(long aprPool, long cctx, long ctx)

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aprPoolback to summary
pack-priv final long aprPool
cctxback to summary
pack-priv final long cctx
ctxback to summary
pack-priv final long ctx

Constructor Detail

OpenSSLStateback to summary
private OpenSSLState(long aprPool, long cctx, long ctx)

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override