Package org.wildfly.openssl
Class SSLImpl
java.lang.Object
org.wildfly.openssl.SSL
org.wildfly.openssl.SSLImpl
Class that contains all static native methods to interact with OpenSSL
-
Field Summary
Fields inherited from class org.wildfly.openssl.SSL
MAC_HOMEBREW_OPENSSL_PATH, ORG_WILDFLY_LIBWFSSL_PATH, ORG_WILDFLY_OPENSSL_PATH, ORG_WILDFLY_OPENSSL_PATH_LIBCRYPTO, ORG_WILDFLY_OPENSSL_PATH_LIBSSL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longbufferAddress(ByteBuffer buffer) protected voidclearSSLContextOptions(long ctx, long options) Clears OpenSSL Options.protected voidclearSSLOptions(long ssl, long options) Clears OpenSSL Options.protected intdoHandshake(long ssl) SSL_do_handshakeprotected voidenableAlpn(long ssl) enables ALPN on the server sideprotected voidfreeBIO(long bio) BIO_freeprotected voidfreeSSL(long ssl) SSL_freeprotected intfreeSSLContext(long ctx) Free the resources used by the Contextprotected StringgetAlpnSelected(long ssl) SSL_get0_alpn_selectedprotected StringgetCipherForSSL(long ssl) SSL_get_cipher.protected String[]getCiphers(long ssl) Returns all Returns the cipher suites that are available for negotiation in an SSL handshake.protected StringgetErrorString(long errorNumber) protected intGet the error number representing the last error OpenSSL encountered on this thread.protected intgetMaxProtoVersion(long ssl) Get the maximum supported protocol version.protected intgetMinProtoVersion(long ssl) Get the minimum supported protocol version.protected longgetOptions(long ssl) Get OpenSSL Option.protected byte[][]getPeerCertChain(long ssl) Get the peer certificate chain ornullif non was send.protected byte[]getPeerCertificate(long ssl) Get the peer certificate ornullif non was send.protected longgetSession(long ssl) Returns the pointer reference to the SSL session.protected longgetSessionCacheMode(long ctx) Get the mode of the current used internal session cache.protected longgetSessionCacheSize(long ctx) Get the size of the internal session cache.protected longgetSessionCacheTimeout(long ctx) Get the timeout for the internal session cache in seconds.protected byte[]getSessionId(long ssl) Returns the ID of the session as byte array representation.protected intgetShutdown(long ssl) SSL_get_shutdownprotected intgetSSLError(long ssl, int code) protected booleangetSSLSessionReused(long ssl) Return whether or not the SSL session was reused.protected longgetTime(long ssl) SSL_get_timeprotected StringgetVersion(long ssl) SSL_get_versionprotected booleanhasOp(int op) Return true if all the requested SSL_OP_* are supported by OpenSSL.protected voidinitialize(String libCryptoPath, String libSslPath) protected voidinvalidateSession(long ctx) invalidates the current SSL sessionprotected booleanprotected intisInInit(long SSL) SSL_in_init.protected longmakeNetworkBIO(long ssl) Wire up internal and network BIOs for the given SSL instance.protected longmakeSSLContext(int protocol, int mode) Create a new SSL context.protected longnewSSL(long ctx, boolean server) SSL_newprotected intpendingReadableBytesInSSL(long ssl) SSL_pending.protected intpendingWrittenBytesInBIO(long bio) BIO_ctrl_pending.protected intreadFromBIO(long bio, long rbuf, int rlen) BIO_read.protected intreadFromSSL(long ssl, long rbuf, int rlen) SSL_readprotected voidregisterSessionContext(long context, org.wildfly.openssl.OpenSSLSessionContext openSSLSessionContext) protected intrenegotiate(long ssl) SSL_renegotiateprotected voidsaveServerCipher(long ssl, int serverCipher) protected longsessionAccept(long ctx) Session resumption statistics methods.protected longsessionAcceptGood(long ctx) protected longsessionAcceptRenegotiate(long ctx) protected longsessionCacheFull(long ctx) protected longsessionCbHits(long ctx) protected longsessionConnect(long ctx) protected longsessionConnectGood(long ctx) protected longsessionConnectRenegotiate(long ctx) protected longsessionHits(long ctx) protected longsessionMisses(long ctx) protected longsessionNumber(long ctx) protected longsessionTimeouts(long ctx) protected voidsetAlpnProtos(long ssl, String[] alpnProtos) Set application layer protocol for application layer protocol negotiation extension.protected booleansetCARevocation(long ctx, String file, String path) Set File of concatenated PEM-encoded CA CRLs or directory of PEM-encoded CA Certificates for Client Auth
This directive sets the all-in-one file where you can assemble the Certificate Revocation Lists (CRL) of Certification Authorities (CA) whose clients you deal with.protected booleansetCertificate(long ctx, byte[] cert, byte[][] encodedIntermediaries, byte[] key, int idx) Set Certificate
Point setCertificateFile at a PEM encoded certificate.protected voidsetCertVerifyCallback(long ctx, org.wildfly.openssl.CertificateVerifier verifier) Allow to hookCertificateVerifierinto the handshake processing.protected booleansetCipherSuite(long ctx, String ciphers) Cipher Suite available for negotiation in SSL handshake.protected booleansetCipherSuites(long ssl, String ciphers) Returns the cipher suites available for negotiation in SSL handshake.protected booleansetCipherSuitesTLS13(long ssl, String ciphers) Sets the cipher suites available for negotiation in the SSL handshake.protected booleansetCipherSuiteTLS13(long ctx, String ciphers) Sets the cipher suites available for negotiation in the SSL handshake.protected voidsetMaxProtoVersion(long ssl, int version) Set the maximum supported protocol version.protected voidsetMinProtoVersion(long ssl, int version) Set the minimum supported protocol version.protected voidsetOptions(long ssl, long options) Set OpenSSL Option.protected voidsetServerALPNCallback(long ssl, org.wildfly.openssl.ServerALPNCallback callback) Sets the server ALPN callback for a spcific engineprotected booleansetServerNameIndication(long ssl, String hostName) protected voidsetSession(long ssl, long session) Sets the session for the SSL instance.protected longsetSessionCacheMode(long ctx, long mode) Set the mode of the internal session cache and return the previous used mode.protected longsetSessionCacheSize(long ctx, long size) Set the size of the internal session cache.protected longsetSessionCacheTimeout(long ctx, long timeoutSeconds) Set the timeout for the internal session cache in seconds.protected booleansetSessionIdContext(long ctx, byte[] sidCtx) Set the context within which session be reused (server side only) http://www.openssl.org/docs/ssl/SSL_CTX_set_session_id_context.htmlprotected voidsetSessionTicketKeys(long ctx, byte[] keys) Set TLS session keys.protected voidsetSSLContextOptions(long ctx, long options) Set OpenSSL Option.protected voidsetSSLOptions(long ssl, long options) Set OpenSSL Option.protected voidsetSSLVerify(long ssl, int level, int depth) Set Type of Client Certificate verification and Maximum depth of CA Certificates in Client Certificate verification.protected intshutdownSSL(long ssl) SSL_shutdownprotected Stringversion()protected longReturn OpenSSL version number.protected intwriteToBIO(long bio, long wbuf, int wlen) BIO_write.protected intwriteToSSL(long ssl, long wbuf, int wlen) SSL_write.Methods inherited from class org.wildfly.openssl.SSL
getInstance
-
Constructor Details
-
SSLImpl
public SSLImpl()
-
-
Method Details
-
initialize
- Specified by:
initializein classSSL
-
version
-
versionNumber
protected long versionNumber()Description copied from class:SSLReturn OpenSSL version number.- Specified by:
versionNumberin classSSL- Returns:
- the version number
-
hasOp
protected boolean hasOp(int op) Description copied from class:SSLReturn true if all the requested SSL_OP_* are supported by OpenSSL.Note that for versions of tcnative < 1.1.25, this method will return
trueif and only ifop=SSL.SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATIONand tcnative supports that flag. -
newSSL
protected long newSSL(long ctx, boolean server) Description copied from class:SSLSSL_new -
pendingWrittenBytesInBIO
protected int pendingWrittenBytesInBIO(long bio) Description copied from class:SSLBIO_ctrl_pending.- Specified by:
pendingWrittenBytesInBIOin classSSL- Parameters:
bio- BIO pointer (BIO *)
-
pendingReadableBytesInSSL
protected int pendingReadableBytesInSSL(long ssl) Description copied from class:SSLSSL_pending.- Specified by:
pendingReadableBytesInSSLin classSSL- Parameters:
ssl- SSL pointer (SSL *)
-
writeToBIO
protected int writeToBIO(long bio, long wbuf, int wlen) Description copied from class:SSLBIO_write.- Specified by:
writeToBIOin classSSL- Parameters:
bio-wbuf-wlen-
-
readFromBIO
protected int readFromBIO(long bio, long rbuf, int rlen) Description copied from class:SSLBIO_read.- Specified by:
readFromBIOin classSSL- Parameters:
bio-rbuf-rlen-
-
writeToSSL
protected int writeToSSL(long ssl, long wbuf, int wlen) Description copied from class:SSLSSL_write.- Specified by:
writeToSSLin classSSL- Parameters:
ssl- the SSL instance (SSL *)wbuf-wlen-
-
readFromSSL
protected int readFromSSL(long ssl, long rbuf, int rlen) Description copied from class:SSLSSL_read- Specified by:
readFromSSLin classSSL- Parameters:
ssl- the SSL instance (SSL *)rbuf-rlen-
-
getShutdown
protected int getShutdown(long ssl) Description copied from class:SSLSSL_get_shutdown- Specified by:
getShutdownin classSSL- Parameters:
ssl- the SSL instance (SSL *)
-
freeSSL
protected void freeSSL(long ssl) Description copied from class:SSLSSL_free -
makeNetworkBIO
protected long makeNetworkBIO(long ssl) Description copied from class:SSLWire up internal and network BIOs for the given SSL instance.Warning: you must explicitly free this resource by calling freeBIO
While the SSL's internal/application data BIO will be freed when freeSSL is called on the provided SSL instance, you must call freeBIO on the returned network BIO.
- Specified by:
makeNetworkBIOin classSSL- Parameters:
ssl- the SSL instance (SSL *)- Returns:
- pointer to the Network BIO (BIO *)
-
freeBIO
protected void freeBIO(long bio) Description copied from class:SSLBIO_free -
shutdownSSL
protected int shutdownSSL(long ssl) Description copied from class:SSLSSL_shutdown- Specified by:
shutdownSSLin classSSL- Parameters:
ssl- the SSL instance (SSL *)
-
getLastErrorNumber
protected int getLastErrorNumber()Description copied from class:SSLGet the error number representing the last error OpenSSL encountered on this thread.- Specified by:
getLastErrorNumberin classSSL
-
getCipherForSSL
Description copied from class:SSLSSL_get_cipher.- Specified by:
getCipherForSSLin classSSL- Parameters:
ssl- the SSL instance (SSL *)
-
getVersion
Description copied from class:SSLSSL_get_version- Specified by:
getVersionin classSSL- Parameters:
ssl- the SSL instance (SSL *)
-
doHandshake
protected int doHandshake(long ssl) Description copied from class:SSLSSL_do_handshake- Specified by:
doHandshakein classSSL- Parameters:
ssl- the SSL instance (SSL *)
-
saveServerCipher
protected void saveServerCipher(long ssl, int serverCipher) - Specified by:
saveServerCipherin classSSL
-
getSSLError
protected int getSSLError(long ssl, int code) - Specified by:
getSSLErrorin classSSL
-
renegotiate
protected int renegotiate(long ssl) Description copied from class:SSLSSL_renegotiate- Specified by:
renegotiatein classSSL- Parameters:
ssl- the SSL instance (SSL *)
-
isInInit
protected int isInInit(long SSL) Description copied from class:SSLSSL_in_init. -
getAlpnSelected
Description copied from class:SSLSSL_get0_alpn_selected- Specified by:
getAlpnSelectedin classSSL- Parameters:
ssl- the SSL instance (SSL *)
-
enableAlpn
protected void enableAlpn(long ssl) Description copied from class:SSLenables ALPN on the server side- Specified by:
enableAlpnin classSSL
-
isAlpnSupported
protected boolean isAlpnSupported()- Specified by:
isAlpnSupportedin classSSL
-
getPeerCertChain
protected byte[][] getPeerCertChain(long ssl) Description copied from class:SSLGet the peer certificate chain ornullif non was send.- Specified by:
getPeerCertChainin classSSL
-
getPeerCertificate
protected byte[] getPeerCertificate(long ssl) Description copied from class:SSLGet the peer certificate ornullif non was send.- Specified by:
getPeerCertificatein classSSL
-
getErrorString
- Specified by:
getErrorStringin classSSL
-
getTime
protected long getTime(long ssl) Description copied from class:SSLSSL_get_time -
setSSLVerify
protected void setSSLVerify(long ssl, int level, int depth) Description copied from class:SSLSet Type of Client Certificate verification and Maximum depth of CA Certificates in Client Certificate verification.
This directive sets the Certificate verification level for the Client Authentication. Notice that this directive can be used both in per-server and per-directory context. In per-server context it applies to the client authentication process used in the standard SSL handshake when a connection is established. In per-directory context it forces a SSL renegotiation with the reconfigured client verification level after the HTTP request was read but before the HTTP response is sent.
The following levels are available for level:SSL_CVERIFY_NONE - No client Certificate is required at all SSL_CVERIFY_OPTIONAL - The client may present a valid Certificate SSL_CVERIFY_REQUIRE - The client has to present a valid Certificate SSL_CVERIFY_OPTIONAL_NO_CA - The client may present a valid Certificate but it need not to be (successfully) verifiable
The depth actually is the maximum number of intermediate certificate issuers, i.e. the number of CA certificates which are max allowed to be followed while verifying the client certificate. A depth of 0 means that self-signed client certificates are accepted only, the default depth of 1 means the client certificate can be self-signed or has to be signed by a CA which is directly known to the server (i.e. the CA's certificate is undersetCACertificatePath, etc.- Specified by:
setSSLVerifyin classSSL- Parameters:
ssl- the SSL instance (SSL *)level- Type of Client Certificate verification.depth- Maximum depth of CA Certificates in Client Certificate verification.
-
setOptions
protected void setOptions(long ssl, long options) Description copied from class:SSLSet OpenSSL Option.- Specified by:
setOptionsin classSSL- Parameters:
ssl- the SSL instance (SSL *)options- See SSL.SSL_OP_* for option flags.
-
getOptions
protected long getOptions(long ssl) Description copied from class:SSLGet OpenSSL Option.- Specified by:
getOptionsin classSSL- Parameters:
ssl- the SSL instance (SSL *)- Returns:
- options See SSL.SSL_OP_* for option flags.
-
getCiphers
Description copied from class:SSLReturns all Returns the cipher suites that are available for negotiation in an SSL handshake.- Specified by:
getCiphersin classSSL- Parameters:
ssl- the SSL instance (SSL *)- Returns:
- ciphers
-
setCipherSuites
Description copied from class:SSLReturns the cipher suites available for negotiation in SSL handshake.
This complex directive uses a colon-separated cipher-spec string consisting of OpenSSL cipher specifications to configure the Cipher Suite the client is permitted to negotiate in the SSL handshake phase. Notice that this directive can be used both in per-server and per-directory context. In per-server context it applies to the standard SSL handshake when a connection is established. In per-directory context it forces a SSL renegotiation with the reconfigured Cipher Suite after the HTTP request was read but before the HTTP response is sent.- Specified by:
setCipherSuitesin classSSL- Parameters:
ssl- the SSL instance (SSL *)ciphers- an SSL cipher specification- Throws:
Exception
-
setCipherSuitesTLS13
Description copied from class:SSLSets the cipher suites available for negotiation in the SSL handshake.
This is a simple colon (":") separated list of TLSv1.3 ciphersuite names in order of preference.- Specified by:
setCipherSuitesTLS13in classSSL- Parameters:
ssl- the SSL instance (SSL *)ciphers- an SSL cipher specification- Throws:
Exception
-
setServerNameIndication
- Specified by:
setServerNameIndicationin classSSL
-
getSession
protected long getSession(long ssl) Description copied from class:SSLReturns the pointer reference to the SSL session. https://www.openssl.org/docs/manmaster/ssl/SSL_get_session.htmlThis uses the
SSL_get1_session(). TheSSL.invalidateSession(long)SSL_SESSION_free} needs to explicitly be called once to decrement the reference count.From the OpenSSL documentation:
If the data is to be kept, SSL_get1_session() will increment the reference count, so that the session will not be implicitly removed by other operations but stays in memory. In order to remove the session
SSL_SESSION_freemust be explicitly called once to decrement the reference count again.- Specified by:
getSessionin classSSL- Parameters:
ssl- the SSL instance (SSL *)- Returns:
- the pointer reference to the SSL session
-
setSession
protected void setSession(long ssl, long session) Description copied from class:SSLSets the session for the SSL instance. https://www.openssl.org/docs/manmaster/ssl/SSL_set_session.html- Specified by:
setSessionin classSSL- Parameters:
ssl- the SSL instance (SSL *)session- the pointer to the SSL session to set the SSL instance to
-
getSessionId
protected byte[] getSessionId(long ssl) Description copied from class:SSLReturns the ID of the session as byte array representation.- Specified by:
getSessionIdin classSSL- Parameters:
ssl- the SSL instance (SSL *)- Returns:
- the session as byte array representation obtained via SSL_SESSION_get_id.
-
bufferAddress
- Specified by:
bufferAddressin classSSL
-
makeSSLContext
Description copied from class:SSLCreate a new SSL context.- Specified by:
makeSSLContextin classSSL- Parameters:
protocol- The SSL protocol to use. It can be any combination of the following:SSL.SSL_PROTOCOL_SSLV2SSL.SSL_PROTOCOL_SSLV3SSL.SSL_PROTOCOL_TLSV1SSL.SSL_PROTOCOL_TLSV1_1SSL.SSL_PROTOCOL_TLSV1_2SSL.SSL_PROTOCOL_TLSV1_3SSL.SSL_PROTOCOL_ALL( == all TLS versions, no SSL)mode- SSL mode to useSSL_MODE_CLIENT SSL_MODE_SERVER SSL_MODE_COMBINED- Returns:
- The Java representation of a pointer to the newly created SSL Context
- Throws:
Exception- If the SSL Context could not be created
-
freeSSLContext
protected int freeSSLContext(long ctx) Description copied from class:SSLFree the resources used by the Context- Specified by:
freeSSLContextin classSSL- Parameters:
ctx- Server or Client context to free.- Returns:
- APR Status code.
-
setSSLContextOptions
protected void setSSLContextOptions(long ctx, long options) Description copied from class:SSLSet OpenSSL Option.- Specified by:
setSSLContextOptionsin classSSL- Parameters:
ctx- Server or Client context to use.options- See SSL.SSL_OP_* for option flags.
-
clearSSLContextOptions
protected void clearSSLContextOptions(long ctx, long options) Description copied from class:SSLClears OpenSSL Options.- Specified by:
clearSSLContextOptionsin classSSL- Parameters:
ctx- Server or Client context to use.options- See SSL.SSL_OP_* for option flags.
-
setSSLOptions
protected void setSSLOptions(long ssl, long options) Description copied from class:SSLSet OpenSSL Option.- Specified by:
setSSLOptionsin classSSL- Parameters:
ssl- Server or Client SSL to use.options- See SSL.SSL_OP_* for option flags.
-
clearSSLOptions
protected void clearSSLOptions(long ssl, long options) Description copied from class:SSLClears OpenSSL Options.- Specified by:
clearSSLOptionsin classSSL- Parameters:
ssl- Server or Client SSL to use.options- See SSL.SSL_OP_* for option flags.
-
setCipherSuite
Description copied from class:SSLCipher Suite available for negotiation in SSL handshake.
This complex directive uses a colon-separated cipher-spec string consisting of OpenSSL cipher specifications to configure the Cipher Suite the client is permitted to negotiate in the SSL handshake phase. Notice that this directive can be used both in per-server and per-directory context. In per-server context it applies to the standard SSL handshake when a connection is established. In per-directory context it forces a SSL renegotiation with the reconfigured Cipher Suite after the HTTP request was read but before the HTTP response is sent.- Specified by:
setCipherSuitein classSSL- Parameters:
ctx- Server or Client context to use.ciphers- An SSL cipher specification.- Throws:
Exception
-
setCipherSuiteTLS13
Description copied from class:SSLSets the cipher suites available for negotiation in the SSL handshake.
This is a simple colon (":") separated list of TLSv1.3 ciphersuite names in order of preference.- Specified by:
setCipherSuiteTLS13in classSSL- Parameters:
ctx- Server or Client context to use.ciphers- an SSL cipher specification- Throws:
Exception
-
setCARevocation
Description copied from class:SSLSet File of concatenated PEM-encoded CA CRLs or directory of PEM-encoded CA Certificates for Client Auth
This directive sets the all-in-one file where you can assemble the Certificate Revocation Lists (CRL) of Certification Authorities (CA) whose clients you deal with. These are used for Client Authentication. Such a file is simply the concatenation of the various PEM-encoded CRL files, in order of preference.
The files in this directory have to be PEM-encoded and are accessed through hash filenames. So usually you can't just place the Certificate files there: you also have to create symbolic links named hash-value.N. And you should always make sure this directory contains the appropriate symbolic links. Use the Makefile which comes with mod_ssl to accomplish this task.- Specified by:
setCARevocationin classSSL- Parameters:
ctx- Server or Client context to use.file- File of concatenated PEM-encoded CA CRLs for Client Auth.path- Directory of PEM-encoded CA Certificates for Client Auth.- Throws:
Exception
-
setCertificate
protected boolean setCertificate(long ctx, byte[] cert, byte[][] encodedIntermediaries, byte[] key, int idx) throws Exception Description copied from class:SSLSet Certificate
Point setCertificateFile at a PEM encoded certificate. If the certificate is encrypted, then you will be prompted for a pass phrase. Note that a kill -HUP will prompt again. A test certificate can be generated with `make certificate' under built time. Keep in mind that if you've both a RSA and a DSA certificate you can configure both in parallel (to also allow the use of DSA ciphers, etc.)
If the key is not combined with the certificate, use key param to point at the key file. Keep in mind that if you've both a RSA and a DSA private key you can configure both in parallel (to also allow the use of DSA ciphers, etc.)- Specified by:
setCertificatein classSSL- Parameters:
ctx- Server or Client context to use.cert- Certificate file.encodedIntermediaries-key- Private Key file to use if not in cert.idx- Certificate index SSL_AIDX_RSA or SSL_AIDX_DSA.- Throws:
Exception
-
setSessionCacheSize
protected long setSessionCacheSize(long ctx, long size) Description copied from class:SSLSet the size of the internal session cache. http://www.openssl.org/docs/ssl/SSL_CTX_sess_set_cache_size.html- Specified by:
setSessionCacheSizein classSSL
-
getSessionCacheSize
protected long getSessionCacheSize(long ctx) Description copied from class:SSLGet the size of the internal session cache. http://www.openssl.org/docs/ssl/SSL_CTX_sess_get_cache_size.html- Specified by:
getSessionCacheSizein classSSL
-
setSessionCacheTimeout
protected long setSessionCacheTimeout(long ctx, long timeoutSeconds) Description copied from class:SSLSet the timeout for the internal session cache in seconds. http://www.openssl.org/docs/ssl/SSL_CTX_set_timeout.html- Specified by:
setSessionCacheTimeoutin classSSL
-
getSessionCacheTimeout
protected long getSessionCacheTimeout(long ctx) Description copied from class:SSLGet the timeout for the internal session cache in seconds. http://www.openssl.org/docs/ssl/SSL_CTX_set_timeout.html- Specified by:
getSessionCacheTimeoutin classSSL
-
setSessionCacheMode
protected long setSessionCacheMode(long ctx, long mode) Description copied from class:SSLSet the mode of the internal session cache and return the previous used mode.- Specified by:
setSessionCacheModein classSSL
-
getSessionCacheMode
protected long getSessionCacheMode(long ctx) Description copied from class:SSLGet the mode of the current used internal session cache.- Specified by:
getSessionCacheModein classSSL
-
sessionAccept
protected long sessionAccept(long ctx) Description copied from class:SSLSession resumption statistics methods. http://www.openssl.org/docs/ssl/SSL_CTX_sess_number.html- Specified by:
sessionAcceptin classSSL
-
sessionAcceptGood
protected long sessionAcceptGood(long ctx) - Specified by:
sessionAcceptGoodin classSSL
-
sessionAcceptRenegotiate
protected long sessionAcceptRenegotiate(long ctx) - Specified by:
sessionAcceptRenegotiatein classSSL
-
sessionCacheFull
protected long sessionCacheFull(long ctx) - Specified by:
sessionCacheFullin classSSL
-
sessionCbHits
protected long sessionCbHits(long ctx) - Specified by:
sessionCbHitsin classSSL
-
sessionConnect
protected long sessionConnect(long ctx) - Specified by:
sessionConnectin classSSL
-
sessionConnectGood
protected long sessionConnectGood(long ctx) - Specified by:
sessionConnectGoodin classSSL
-
sessionConnectRenegotiate
protected long sessionConnectRenegotiate(long ctx) - Specified by:
sessionConnectRenegotiatein classSSL
-
sessionHits
protected long sessionHits(long ctx) - Specified by:
sessionHitsin classSSL
-
sessionMisses
protected long sessionMisses(long ctx) - Specified by:
sessionMissesin classSSL
-
sessionNumber
protected long sessionNumber(long ctx) - Specified by:
sessionNumberin classSSL
-
sessionTimeouts
protected long sessionTimeouts(long ctx) - Specified by:
sessionTimeoutsin classSSL
-
setSessionTicketKeys
protected void setSessionTicketKeys(long ctx, byte[] keys) Description copied from class:SSLSet TLS session keys. This allows us to share keys across TFEs.- Specified by:
setSessionTicketKeysin classSSL
-
invalidateSession
protected void invalidateSession(long ctx) Description copied from class:SSLinvalidates the current SSL session- Specified by:
invalidateSessionin classSSL
-
registerSessionContext
protected void registerSessionContext(long context, org.wildfly.openssl.OpenSSLSessionContext openSSLSessionContext) - Specified by:
registerSessionContextin classSSL
-
setCertVerifyCallback
protected void setCertVerifyCallback(long ctx, org.wildfly.openssl.CertificateVerifier verifier) Description copied from class:SSLAllow to hookCertificateVerifierinto the handshake processing. This will callSSL_CTX_set_cert_verify_callbackand so replace the default verification callback used by openssl- Specified by:
setCertVerifyCallbackin classSSL- Parameters:
ctx- Server or Client context to use.verifier- the verifier to call during handshake.
-
setAlpnProtos
Description copied from class:SSLSet application layer protocol for application layer protocol negotiation extension.This should only be called by the client.
- Specified by:
setAlpnProtosin classSSL- Parameters:
ssl- SSL Engine to usealpnProtos- protocols in priority order
-
setServerALPNCallback
protected void setServerALPNCallback(long ssl, org.wildfly.openssl.ServerALPNCallback callback) Description copied from class:SSLSets the server ALPN callback for a spcific engine- Specified by:
setServerALPNCallbackin classSSL- Parameters:
ssl- The SSL enginecallback- the callbackto use
-
setSessionIdContext
protected boolean setSessionIdContext(long ctx, byte[] sidCtx) Description copied from class:SSLSet the context within which session be reused (server side only) http://www.openssl.org/docs/ssl/SSL_CTX_set_session_id_context.html- Specified by:
setSessionIdContextin classSSL- Parameters:
ctx- Server context to use.sidCtx- can be any kind of binary data, it is therefore possible to use e.g. the name of the application and/or the hostname and/or service name- Returns:
trueif success,falseotherwise.
-
setMinProtoVersion
protected void setMinProtoVersion(long ssl, int version) Description copied from class:SSLSet the minimum supported protocol version. This will callSSL_set_min_proto_version. See https://www.openssl.org/docs/manmaster/man3/SSL_set_min_proto_version.html.- Specified by:
setMinProtoVersionin classSSL- Parameters:
ssl- the SSL engineversion- the minimum supported protocol version
-
setMaxProtoVersion
protected void setMaxProtoVersion(long ssl, int version) Description copied from class:SSLSet the maximum supported protocol version. This will callSSL_set_max_proto_version. See https://www.openssl.org/docs/manmaster/man3/SSL_set_max_proto_version.html.- Specified by:
setMaxProtoVersionin classSSL- Parameters:
ssl- the SSL engineversion- the maximum supported protocol version
-
getMinProtoVersion
protected int getMinProtoVersion(long ssl) Description copied from class:SSLGet the minimum supported protocol version. This will callSSL_get_min_proto_version. See https://www.openssl.org/docs/manmaster/man3/SSL_get_min_proto_version.html.- Specified by:
getMinProtoVersionin classSSL- Parameters:
ssl- the SSL engine- Returns:
- the minimum supported protocol version
-
getMaxProtoVersion
protected int getMaxProtoVersion(long ssl) Description copied from class:SSLGet the maximum supported protocol version. This will callSSL_get_max_proto_version. See https://www.openssl.org/docs/manmaster/man3/SSL_get_max_proto_version.html.- Specified by:
getMaxProtoVersionin classSSL- Parameters:
ssl- the SSL engine- Returns:
- the maximum supported protocol version
-
getSSLSessionReused
protected boolean getSSLSessionReused(long ssl) Description copied from class:SSLReturn whether or not the SSL session was reused. See https://www.openssl.org/docs/man1.1.1/man3/SSL_session_reused.html- Specified by:
getSSLSessionReusedin classSSL- Parameters:
ssl- the SSL engine- Returns:
trueif the SSL session was reused andfalseotherwise
-