| Modifier and Type | Field and Description |
|---|---|
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static int | Returns: one on success or zero on errorcontext, to which, the algorithm should be added. ctx, int indicates whether decompression support should be advertized, compression should be applied for
peers which support it, or both. This allows the caller to support one way compression only.
direction, final CertificateCompressionAlgo
implementation of the compression and or decompression algorithm as a algorithm)CertificateCompressionAlgoAdds a certificate compression algorithm to the given |
| private static native int | addCertificateCompressionAlgorithm0(long ctx, int direction, int algorithmId, final CertificateCompressionAlgo algorithm)
|
| public static native void | clearOptions(long
Server or Client context to use. ctx, int See SSL.SSL_OP_* for option flags. options)Clears OpenSSL Options. |
| public static native void | |
| public static native void | enableOcsp(long ctx, boolean client)
Enables OCSP stapling for the given |
| public static native int | Returns: APR Status code.Server or Client context to free. ctx)Free the resources used by the Context |
| public static native int | |
| public static native int | Returns: options See SSL.SSL_OP_* for option flags.Server or Client context to use. ctx)Get OpenSSL Option. |
| public static native long | Returns: the current modeServer or Client context to use ctx)Get the mode of the current used internal session cache. |
| public static native long | Returns: the current valueServer or Client context to use. ctx)Get the size of the internal session cache. |
| public static native long | Returns: the current valueServer or Client context to use ctx)Get the timeout for the internal session cache in seconds. |
| public static native long | |
| public static native long | Returns: the SSLContext structThe SSL protocol to use. It can be any combination of
the following:
protocol, int
SSL mode to use
mode)SSL_MODE_CLIENT SSL_MODE_SERVER SSL_MODE_COMBINED Initialize new SSL context |
| private static byte[] | |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static native long | Returns: the current numberServer or Client context to use ctx)TLS session ticket key resumption statistics. |
| public static native long | Returns: the current numberServer or Client context to use ctx)TLS session ticket key resumption statistics. |
| public static native long | Returns: the current numberServer or Client context to use ctx)TLS session ticket key resumption statistics. |
| public static native long | Returns: the current numberServer or Client context to use ctx)TLS session ticket key resumption statistics. |
| public static native long | Returns: the current numberServer or Client context to use ctx)Session resumption statistics methods. |
| public static void | setAlpnProtos(long
Server context to use. ctx, String[] protocols in priority order alpnProtos, int selectorFailureBehavior)Set application layer protocol for application layer protocol negotiation extension |
| private static native void | |
| public static native boolean | Returns: true if successful, false otherwise.Server context to use. ctx, long Directory of PEM-encoded CA Certificates for Client Auth. certBio)Set concatenated PEM-encoded CA Certificates for Client Auth This directive sets the all-in-one BIO where you can assemble the Certificates of Certification Authorities (CA) whose clients you deal with. |
| public static native boolean | Returns: true if successfulServer or Client context to use. ctx, String Certificate file. cert, String Private Key file to use if not in cert. key, String Certificate password. If null and certificate
is encrypted, password prompt will be displayed. password)Set Certificate Point setCertificateFile at a PEM encoded certificate. |
| public static native boolean | Returns: true if successfulServer or Client context to use. ctx, long Certificate BIO. certBio, long Private Key BIO to use if not in cert. keyBio, String Certificate password. If null and certificate
is encrypted, password prompt will be displayed. password)Set Certificate Point setCertificate at a PEM encoded certificate stored in a BIO. |
| public static native void | setCertificateCallback(long
Server or Client context to use. ctx, CertificateCallback the callback to call during certificate selection. callback)Allow to hook |
| public static native boolean | Returns: true if successfulServer or Client context to use. ctx, long BIO of PEM-encoded Server CA Certificates. bio, boolean Skip first certificate if chain file is inside
certificate file. skipfirst)Set BIO of PEM-encoded Server CA Certificates This directive sets the optional all-in-one file where you can assemble the certificates of Certification Authorities (CA) which form the certificate chain of the server certificate. |
| public static native boolean | Returns: true if successfulServer or Client context to use. ctx, String File of PEM-encoded Server CA Certificates. file, boolean Skip first certificate if chain file is inside
certificate file. skipfirst)Set File of PEM-encoded Server CA Certificates This directive sets the optional all-in-one file where you can assemble the certificates of Certification Authorities (CA) which form the certificate chain of the server certificate. |
| public static native void | setCertRequestedCallback(long
Server or Client context to use. ctx, CertificateRequestedCallback the callback to call during certificate selection. callback)
Deprecated
use
Allow to hook setCertificateCallback(long, CertificateCallback)
CertificateRequestedCallback into the certificate choosing process.
|
| public static native void | setCertVerifyCallback(long
Server or Client context to use. ctx, CertificateVerifier the verifier to call during handshake. verifier)Allow to hook |
| public static boolean | Returns: true if successfulServer or Client context to use. ctx, String An SSL cipher specification. ciphers)
Deprecated
Use
Cipher Suite available for negotiation in SSL handshake.
setCipherSuite(long, String, boolean).
|
| public static native boolean | Returns: true if successfulServer or Client context to use. ctx, String An SSL cipher specification. ciphers, boolean true if the ciphers are for TLSv1.3Cipher Suite available for negotiation in SSL handshake. |
| public static native void | setContextId(long
Context to use. ctx, String String that uniquely identifies this context. id)Set Session context id. Usually host:port combination. |
| public static boolean | Returns: true if successful, false otherwise.context to use ctx, String... the curves to use. curves)Sets the curves to use. |
| private static native boolean | |
| public static native void | setMaxCertList(long
context to use ctx, int the maximum number of bytes size)Set the maximum number of bytes for the certificate chain during handshake. |
| public static native int | |
| public static void | setNpnProtos(long
Server context to use. ctx, String[] protocols in priority order nextProtos, int selectorFailureBehavior)Set next protocol for next protocol negotiation extension |
| private static native void | |
| public static native boolean | Returns: true if successful, false otherwise.context to use ctx, int the number of tickets tickets)Set the number of TLSv1.3 session tickets that will be sent to the client after a full handshake. |
| public static native void | setOptions(long
Server or Client context to use. ctx, int See SSL.SSL_OP_* for option flags. options)Set OpenSSL Option. |
| public static void | setPrivateKeyMethod(long
context to use ctx, final SSLPrivateKeyMethod method to use for the given context. method)Set the |
| public static void | setPrivateKeyMethod(long
context to use ctx, AsyncSSLPrivateKeyMethod method to use for the given context. method)Sets the |
| private static native void | |
| public static native long | Returns: the previous set valueServer or Client context to use ctx, long the mode of the cache mode)Set the mode of the internal session cache and return the previous used mode. |
| public static native long | Returns: the previous set valueServer or Client context to use. ctx, long the size of the cache size)Set the size of the internal session cache. |
| public static native long | Returns: the previous set valueServer or Client context to use. ctx, long the timeout of the cache timeoutSeconds)Set the timeout for the internal session cache in seconds. |
| public static native boolean | Returns: true if success, false otherwise.Server context to use. ctx, byte[] 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 sidCtx)Set the context within which session be reused (server side only). |
| public static void | setSessionTicketKeys(long
Server or Client context to use ctx, SessionTicketKey[] the keys)SessionTicketKeysSet TLS session ticket keys. |
| private static native void | |
| public static native void | setSniHostnameMatcher(long
Server or Client context to use. ctx, SniHostNameMatcher the matcher to call during sni hostname matching. matcher)Allow to hook |
| public static native void | setSSLSessionCache(long
context to use. ctx, SSLSessionCache cache to use for the given context. cache)Set the |
| public static native void | |
| public static native void | setUseTasks(long
context to use ctx, boolean true to enable, false to disable.Enable or disable producing of tasks that should be obtained via |
| public static native void | setVerify(long
Server or Client context to use. ctx, int Type of Client Certificate verification. level, int Maximum depth of CA Certificates in Client Certificate
verification. depth)Set Type of Client Certificate verification and Maximum depth of CA Certificates in Client Certificate verification. |
| MAX_ALPN_NPN_PROTO_SIZE | back to summary |
|---|---|
| private static final int MAX_ALPN_NPN_PROTO_SIZE | |
| SSLContext | back to summary |
|---|---|
| private SSLContext() | |
| addCertificateCompressionAlgorithm | back to summary |
|---|---|
| public static int addCertificateCompressionAlgorithm(long ctx, int direction, final CertificateCompressionAlgo algorithm) Adds a certificate compression algorithm to the given
| |
| addCertificateCompressionAlgorithm0 | back to summary |
|---|---|
| private static native int addCertificateCompressionAlgorithm0(long ctx, int direction, int algorithmId, final CertificateCompressionAlgo algorithm) | |
| clearOptions | back to summary |
|---|---|
| public static native void clearOptions(long ctx, int options) Clears OpenSSL Options.
| |
| disableOcsp | back to summary |
|---|---|
| public static native void disableOcsp(long ctx) Disables OCSP stapling on the given | |
| enableOcsp | back to summary |
|---|---|
| public static native void enableOcsp(long ctx, boolean client) Enables OCSP stapling for the given | |
| free | back to summary |
|---|---|
| public static native int free(long ctx) Free the resources used by the Context
| |
| getMode | back to summary |
|---|---|
| public static native int getMode(long ctx) Call SSL_CTX_get_mode
| |
| getOptions | back to summary |
|---|---|
| public static native int getOptions(long ctx) Get OpenSSL Option.
| |
| getSessionCacheMode | back to summary |
|---|---|
| public static native long getSessionCacheMode(long ctx) Get the mode of the current used internal session cache.
| |
| getSessionCacheSize | back to summary |
|---|---|
| public static native long getSessionCacheSize(long ctx) Get the size of the internal session cache. See man SSL_CTX_sess_get_cache_size
| |
| getSessionCacheTimeout | back to summary |
|---|---|
| public static native long getSessionCacheTimeout(long ctx) Get the timeout for the internal session cache in seconds. See man SSL_CTX_get_timeout
| |
| getSslCtx | back to summary |
|---|---|
| public static native long getSslCtx(long ctx) Returns the | |
| make | back to summary |
|---|---|
| public static native long make(int protocol, int mode) throws Exception Initialize new SSL context
| |
| protocolsToWireFormat | back to summary |
|---|---|
| private static byte[] protocolsToWireFormat(String[] protocols) | |
| sessionAccept | back to summary |
|---|---|
| public static native long sessionAccept(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionAcceptGood | back to summary |
|---|---|
| public static native long sessionAcceptGood(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionAcceptRenegotiate | back to summary |
|---|---|
| public static native long sessionAcceptRenegotiate(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionCacheFull | back to summary |
|---|---|
| public static native long sessionCacheFull(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionCbHits | back to summary |
|---|---|
| public static native long sessionCbHits(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionConnect | back to summary |
|---|---|
| public static native long sessionConnect(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionConnectGood | back to summary |
|---|---|
| public static native long sessionConnectGood(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionConnectRenegotiate | back to summary |
|---|---|
| public static native long sessionConnectRenegotiate(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionHits | back to summary |
|---|---|
| public static native long sessionHits(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionMisses | back to summary |
|---|---|
| public static native long sessionMisses(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionNumber | back to summary |
|---|---|
| public static native long sessionNumber(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| sessionTicketKeyFail | back to summary |
|---|---|
| public static native long sessionTicketKeyFail(long ctx) TLS session ticket key resumption statistics.
| |
| sessionTicketKeyNew | back to summary |
|---|---|
| public static native long sessionTicketKeyNew(long ctx) TLS session ticket key resumption statistics.
| |
| sessionTicketKeyRenew | back to summary |
|---|---|
| public static native long sessionTicketKeyRenew(long ctx) TLS session ticket key resumption statistics.
| |
| sessionTicketKeyResume | back to summary |
|---|---|
| public static native long sessionTicketKeyResume(long ctx) TLS session ticket key resumption statistics.
| |
| sessionTimeouts | back to summary |
|---|---|
| public static native long sessionTimeouts(long ctx) Session resumption statistics methods. See man SSL_CTX_sess_number
| |
| setAlpnProtos | back to summary |
|---|---|
| public static void setAlpnProtos(long ctx, String[] alpnProtos, int selectorFailureBehavior) Set application layer protocol for application layer protocol negotiation extension
| |
| setAlpnProtos0 | back to summary |
|---|---|
| private static native void setAlpnProtos0(long ctx, byte[] alpnProtos, int selectorFailureBehavior) | |
| setCACertificateBio | back to summary |
|---|---|
| public static native boolean setCACertificateBio(long ctx, long certBio) Set concatenated PEM-encoded CA Certificates for Client Auth
| |
| setCertificate | back to summary |
|---|---|
| public static native boolean setCertificate(long ctx, String cert, String key, String password) throws Exception Set 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.)
| |
| setCertificateBio | back to summary |
|---|---|
| public static native boolean setCertificateBio(long ctx, long certBio, long keyBio, String password) throws Exception Set Certificate Point setCertificate at a PEM encoded certificate stored in a BIO. 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.)
| |
| setCertificateCallback | back to summary |
|---|---|
| public static native void setCertificateCallback(long ctx, CertificateCallback callback) Allow to hook
| |
| setCertificateChainBio | back to summary |
|---|---|
| public static native boolean setCertificateChainBio(long ctx, long bio, boolean skipfirst) Set BIO of PEM-encoded Server CA Certificates This directive sets the optional all-in-one file where you can assemble the certificates of Certification Authorities (CA) which form the certificate chain of the server certificate. This starts with the issuing CA certificate of of the server certificate and can range up to the root CA certificate. Such a file is simply the concatenation of the various PEM-encoded CA Certificate files, usually in certificate chain order. But be careful: Providing the certificate chain works only if you are using a single (either RSA or DSA) based server certificate. If you are using a coupled RSA+DSA certificate pair, this will work only if actually both certificates use the same certificate chain. Otherwsie the browsers will be confused in this situation.
| |
| setCertificateChainFile | back to summary |
|---|---|
| public static native boolean setCertificateChainFile(long ctx, String file, boolean skipfirst) Set File of PEM-encoded Server CA Certificates
| |
| setCertRequestedCallback | back to summary |
|---|---|
| public static native void setCertRequestedCallback(long ctx, CertificateRequestedCallback callback)
Deprecated Allow to hook
| |
| setCertVerifyCallback | back to summary |
|---|---|
| public static native void setCertVerifyCallback(long ctx, CertificateVerifier verifier) Allow to hook
| |
| setCipherSuite | back to summary |
|---|---|
| public static boolean setCipherSuite(long ctx, String ciphers) throws Exception
Deprecated Cipher Suite available for negotiation in SSL handshake.
| |
| setCipherSuite | back to summary |
|---|---|
| public static native boolean setCipherSuite(long ctx, String ciphers, boolean tlsv13) throws Exception Cipher Suite available for negotiation in SSL handshake.
| |
| setContextId | back to summary |
|---|---|
| public static native void setContextId(long ctx, String id) Set Session context id. Usually host:port combination.
| |
| setCurvesList | back to summary |
|---|---|
| public static boolean setCurvesList(long ctx, String... curves) Sets the curves to use. See SSL_CTX_set1_curves_list.
| |
| setCurvesList0 | back to summary |
|---|---|
| private static native boolean setCurvesList0(long ctx, String curves) | |
| setMaxCertList | back to summary |
|---|---|
| public static native void setMaxCertList(long ctx, int size) Set the maximum number of bytes for the certificate chain during handshake. See SSL_CTX_set_max_cert_list for more details.
| |
| setMode | back to summary |
|---|---|
| public static native int setMode(long ctx, int mode) Call SSL_CTX_set_mode
| |
| setNpnProtos | back to summary |
|---|---|
| public static void setNpnProtos(long ctx, String[] nextProtos, int selectorFailureBehavior) Set next protocol for next protocol negotiation extension
| |
| setNpnProtos0 | back to summary |
|---|---|
| private static native void setNpnProtos0(long ctx, byte[] nextProtos, int selectorFailureBehavior) | |
| setNumTickets | back to summary |
|---|---|
| public static native boolean setNumTickets(long ctx, int tickets) Set the number of TLSv1.3 session tickets that will be sent to the client after a full handshake. See SSL_CTX_set_num_tickets for more details.
| |
| setOptions | back to summary |
|---|---|
| public static native void setOptions(long ctx, int options) Set OpenSSL Option.
| |
| setPrivateKeyMethod | back to summary |
|---|---|
| public static void setPrivateKeyMethod(long ctx, final SSLPrivateKeyMethod method) Set the
| |
| setPrivateKeyMethod | back to summary |
|---|---|
| public static void setPrivateKeyMethod(long ctx, AsyncSSLPrivateKeyMethod method) Sets the
| |
| setPrivateKeyMethod0 | back to summary |
|---|---|
| private static native void setPrivateKeyMethod0(long ctx, AsyncSSLPrivateKeyMethod method) | |
| setSessionCacheMode | back to summary |
|---|---|
| public static native long setSessionCacheMode(long ctx, long mode) Set the mode of the internal session cache and return the previous used mode.
| |
| setSessionCacheSize | back to summary |
|---|---|
| public static native long setSessionCacheSize(long ctx, long size) Set the size of the internal session cache. See man SSL_CTX_sess_set_cache_size
| |
| setSessionCacheTimeout | back to summary |
|---|---|
| public static native long setSessionCacheTimeout(long ctx, long timeoutSeconds) Set the timeout for the internal session cache in seconds. See man SSL_CTX_set_timeout
| |
| setSessionIdContext | back to summary |
|---|---|
| public static native boolean setSessionIdContext(long ctx, byte[] sidCtx) Set the context within which session be reused (server side only). See man SSL_CTX_set_session_id_context
| |
| setSessionTicketKeys | back to summary |
|---|---|
| public static void setSessionTicketKeys(long ctx, SessionTicketKey[] keys) Set TLS session ticket keys. The first key in the list is the primary key. Tickets dervied from the other keys in the list will be accepted but updated to a new ticket using the primary key. This is useful for implementing ticket key rotation. See RFC 5077
| |
| setSessionTicketKeys0 | back to summary |
|---|---|
| private static native void setSessionTicketKeys0(long ctx, byte[] keys) Set TLS session keys. | |
| setSniHostnameMatcher | back to summary |
|---|---|
| public static native void setSniHostnameMatcher(long ctx, SniHostNameMatcher matcher) Allow to hook
| |
| setSSLSessionCache | back to summary |
|---|---|
| public static native void setSSLSessionCache(long ctx, SSLSessionCache cache) Set the
| |
| setTmpDHLength | back to summary |
|---|---|
| public static native void setTmpDHLength(long ctx, int length) Set length of the DH to use.
| |
| setUseTasks | back to summary |
|---|---|
| public static native void setUseTasks(long ctx, boolean useTasks) Enable or disable producing of tasks that should be obtained via
| |
| setVerify | back to summary |
|---|---|
| public static native void setVerify(long ctx, int level, int depth) Set Type of Client Certificate verification and Maximum depth of CA Certificates
in Client Certificate verification.
setCACertificatePath), etc.
| |