public final class NativeCrypto extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
NativeCrypto.SSLHandshakeCallbacks
A collection of callbacks from the native OpenSSL code that are
related to the SSL handshake initiated by SSL_do_handshake.
|
| Modifier and Type | Field and Description |
|---|---|
static String[] |
DEFAULT_PROTOCOLS |
static int |
EXTENSION_TYPE_CRITICAL
Used to request only critical types in get_X509*_ext_oids.
|
static int |
EXTENSION_TYPE_NON_CRITICAL
Used to request only non-critical types in get_X509*_ext_oids.
|
static int |
GN_STACK_ISSUER_ALT_NAME
Used to request get_X509_GENERAL_NAME_stack get the issuerAlternativeName
extension.
|
static int |
GN_STACK_SUBJECT_ALT_NAME
Used to request get_X509_GENERAL_NAME_stack get the "altname" field.
|
static Map<String,String> |
OPENSSL_TO_STANDARD_CIPHER_SUITES |
static int |
PKCS7_CERTS
Used as the "which" field in d2i_PKCS7_bio and PEM_read_bio_PKCS7.
|
static int |
PKCS7_CRLS
Used as the "which" field in d2i_PKCS7_bio and PEM_read_bio_PKCS7.
|
static int |
SSL_VERIFY_FAIL_IF_NO_PEER_CERT |
static int |
SSL_VERIFY_NONE |
static int |
SSL_VERIFY_PEER |
static Map<String,String> |
STANDARD_TO_OPENSSL_CIPHER_SUITES |
static Set<String> |
SUPPORTED_CIPHER_SUITES_SET |
static String |
TLS_EMPTY_RENEGOTIATION_INFO_SCSV
TLS_EMPTY_RENEGOTIATION_INFO_SCSV is RFC 5746's renegotiation
indication signaling cipher suite value.
|
static String |
TLS_FALLBACK_SCSV
TLS_FALLBACK_SCSV is from
https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00
to indicate to the server that this is a fallback protocol
request.
|
static String[] |
TLSV1_PROTOCOLS
Protocols to enable by default when "TLSv1" is requested.
|
static String[] |
TLSV11_PROTOCOLS
Protocols to enable by default when "TLSv1.1" is requested.
|
static String[] |
TLSV12_PROTOCOLS
Protocols to enable by default when "TLSv1.2" is requested.
|
| Constructor and Description |
|---|
NativeCrypto() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
ASN1_seq_pack_X509(long[] x509CertRefs) |
static long[] |
ASN1_seq_unpack_X509_bio(long bioRef) |
static void |
ASN1_TIME_to_Calendar(long asn1TimeCtx,
Calendar cal) |
static void |
BIO_free_all(long bioRef) |
static int |
BIO_read(long bioRef,
byte[] buffer) |
static void |
BIO_write(long bioRef,
byte[] buffer,
int offset,
int length) |
static String[] |
checkEnabledCipherSuites(String[] cipherSuites) |
static String[] |
checkEnabledProtocols(String[] protocols) |
static long |
create_BIO_InputStream(OpenSSLBIOInputStream is,
boolean isFinite) |
static long |
create_BIO_OutputStream(OutputStream os) |
static long[] |
d2i_PKCS7_bio(long bioCtx,
int which)
Returns an array of X509 or X509_CRL pointers.
|
static long |
d2i_PKCS8_PRIV_KEY_INFO(byte[] data) |
static long |
d2i_PUBKEY(byte[] data) |
static long |
d2i_SSL_SESSION(byte[] data) |
static long |
d2i_X509_bio(long bioCtx) |
static long |
d2i_X509_CRL_bio(long bioCtx) |
static long |
d2i_X509(byte[] encoded) |
static void |
EC_GROUP_clear_free(long groupRef) |
static byte[] |
EC_GROUP_get_cofactor(NativeRef.EC_GROUP groupRef) |
static String |
EC_GROUP_get_curve_name(NativeRef.EC_GROUP groupRef) |
static byte[][] |
EC_GROUP_get_curve(NativeRef.EC_GROUP groupRef) |
static int |
EC_GROUP_get_degree(NativeRef.EC_GROUP groupRef) |
static long |
EC_GROUP_get_generator(NativeRef.EC_GROUP groupRef) |
static byte[] |
EC_GROUP_get_order(NativeRef.EC_GROUP groupRef) |
static long |
EC_GROUP_new_arbitrary(byte[] p,
byte[] a,
byte[] b,
byte[] x,
byte[] y,
byte[] order,
int cofactor) |
static long |
EC_GROUP_new_by_curve_name(String curveName) |
static long |
EC_KEY_generate_key(NativeRef.EC_GROUP groupRef) |
static byte[] |
EC_KEY_get_private_key(NativeRef.EVP_PKEY keyRef) |
static long |
EC_KEY_get_public_key(NativeRef.EVP_PKEY keyRef) |
static long |
EC_KEY_get1_group(NativeRef.EVP_PKEY pkeyRef) |
static void |
EC_POINT_clear_free(long pointRef) |
static byte[][] |
EC_POINT_get_affine_coordinates(NativeRef.EC_GROUP groupRef,
NativeRef.EC_POINT pointRef) |
static long |
EC_POINT_new(NativeRef.EC_GROUP groupRef) |
static void |
EC_POINT_set_affine_coordinates(NativeRef.EC_GROUP groupRef,
NativeRef.EC_POINT pointRef,
byte[] x,
byte[] y) |
static int |
ECDH_compute_key(byte[] out,
int outOffset,
NativeRef.EVP_PKEY publicKeyRef,
NativeRef.EVP_PKEY privateKeyRef) |
static int |
ENGINE_SSL_do_handshake(long ssl,
NativeCrypto.SSLHandshakeCallbacks shc)
|
static int |
ENGINE_SSL_read_BIO_direct(long sslRef,
long bioRef,
long address,
int len,
NativeCrypto.SSLHandshakeCallbacks shc)
Reads data from the given BIO into a direct
ByteBuffer. |
static int |
ENGINE_SSL_read_BIO_heap(long sslRef,
long bioRef,
byte[] destJava,
int destOffset,
int destLength,
NativeCrypto.SSLHandshakeCallbacks shc)
Reads data from the given BIO into an array.
|
static int |
ENGINE_SSL_read_direct(long sslNativePointer,
long address,
int length,
NativeCrypto.SSLHandshakeCallbacks shc)
Variant of the
SSL_read(long, java.io.FileDescriptor, org.conscrypt.NativeCrypto.SSLHandshakeCallbacks, byte[], int, int, int) for a direct ByteBuffer used by OpenSSLEngineImpl. |
static int |
ENGINE_SSL_read_heap(long sslNativePointer,
byte[] destJava,
int destOffset,
int destLength,
NativeCrypto.SSLHandshakeCallbacks shc)
Variant of the
SSL_read(long, java.io.FileDescriptor, org.conscrypt.NativeCrypto.SSLHandshakeCallbacks, byte[], int, int, int) for a heap ByteBuffer used by OpenSSLEngineImpl. |
static void |
ENGINE_SSL_shutdown(long sslNativePointer,
NativeCrypto.SSLHandshakeCallbacks shc)
|
static int |
ENGINE_SSL_write_BIO_direct(long sslRef,
long bioRef,
long pos,
int length,
NativeCrypto.SSLHandshakeCallbacks shc)
Writes data from the given direct
ByteBuffer to the BIO. |
static int |
ENGINE_SSL_write_BIO_heap(long sslRef,
long bioRef,
byte[] sourceJava,
int sourceOffset,
int sourceLength,
NativeCrypto.SSLHandshakeCallbacks shc)
Writes data from the given array to the BIO.
|
static int |
ENGINE_SSL_write_direct(long sslNativePointer,
long address,
int length,
NativeCrypto.SSLHandshakeCallbacks shc)
Variant of the
SSL_write(long, java.io.FileDescriptor, org.conscrypt.NativeCrypto.SSLHandshakeCallbacks, byte[], int, int, int) for a direct ByteBuffer used by OpenSSLEngineImpl. |
static int |
ENGINE_SSL_write_heap(long sslNativePointer,
byte[] sourceJava,
int sourceOffset,
int sourceLength,
NativeCrypto.SSLHandshakeCallbacks shc)
Variant of the
SSL_write(long, java.io.FileDescriptor, org.conscrypt.NativeCrypto.SSLHandshakeCallbacks, byte[], int, int, int) for a heap ByteBuffer used by OpenSSLEngineImpl. |
static long |
ERR_peek_last_error() |
static long |
EVP_aead_aes_128_gcm() |
static long |
EVP_aead_aes_256_gcm() |
static int |
EVP_AEAD_CTX_open(long evpAead,
byte[] key,
int tagLengthInBytes,
byte[] out,
int outOffset,
byte[] nonce,
byte[] in,
int inOffset,
int inLength,
byte[] ad) |
static int |
EVP_AEAD_CTX_seal(long evpAead,
byte[] key,
int tagLengthInBytes,
byte[] out,
int outOffset,
byte[] nonce,
byte[] in,
int inOffset,
int inLength,
byte[] ad) |
static int |
EVP_AEAD_max_overhead(long evpAead) |
static int |
EVP_AEAD_max_tag_len(long evpAead) |
static int |
EVP_AEAD_nonce_length(long evpAead) |
static int |
EVP_CIPHER_CTX_block_size(NativeRef.EVP_CIPHER_CTX ctx) |
static void |
EVP_CIPHER_CTX_free(long ctx) |
static long |
EVP_CIPHER_CTX_new() |
static void |
EVP_CIPHER_CTX_set_key_length(NativeRef.EVP_CIPHER_CTX ctx,
int keyBitSize) |
static void |
EVP_CIPHER_CTX_set_padding(NativeRef.EVP_CIPHER_CTX ctx,
boolean enablePadding) |
static int |
EVP_CIPHER_iv_length(long evpCipher) |
static int |
EVP_CipherFinal_ex(NativeRef.EVP_CIPHER_CTX ctx,
byte[] out,
int outOffset) |
static void |
EVP_CipherInit_ex(NativeRef.EVP_CIPHER_CTX ctx,
long evpCipher,
byte[] key,
byte[] iv,
boolean encrypting) |
static int |
EVP_CipherUpdate(NativeRef.EVP_CIPHER_CTX ctx,
byte[] out,
int outOffset,
byte[] in,
int inOffset,
int inLength) |
static int |
EVP_DigestFinal_ex(NativeRef.EVP_MD_CTX ctx,
byte[] hash,
int offset) |
static int |
EVP_DigestInit_ex(NativeRef.EVP_MD_CTX ctx,
long evp_md) |
static byte[] |
EVP_DigestSignFinal(NativeRef.EVP_MD_CTX ctx) |
static long |
EVP_DigestSignInit(NativeRef.EVP_MD_CTX ctx,
long evpMdRef,
NativeRef.EVP_PKEY key) |
static void |
EVP_DigestSignUpdate(NativeRef.EVP_MD_CTX ctx,
byte[] buffer,
int offset,
int length) |
static void |
EVP_DigestSignUpdateDirect(NativeRef.EVP_MD_CTX ctx,
long ptr,
int length) |
static void |
EVP_DigestUpdate(NativeRef.EVP_MD_CTX ctx,
byte[] buffer,
int offset,
int length) |
static void |
EVP_DigestUpdateDirect(NativeRef.EVP_MD_CTX ctx,
long ptr,
int length) |
static boolean |
EVP_DigestVerifyFinal(NativeRef.EVP_MD_CTX ctx,
byte[] signature,
int offset,
int length) |
static long |
EVP_DigestVerifyInit(NativeRef.EVP_MD_CTX ctx,
long evpMdRef,
NativeRef.EVP_PKEY key) |
static void |
EVP_DigestVerifyUpdate(NativeRef.EVP_MD_CTX ctx,
byte[] buffer,
int offset,
int length) |
static void |
EVP_DigestVerifyUpdateDirect(NativeRef.EVP_MD_CTX ctx,
long ptr,
int length) |
static long |
EVP_get_cipherbyname(String string) |
static long |
EVP_get_digestbyname(String name) |
static int |
EVP_has_aes_hardware()
Returns 1 if the BoringSSL believes the CPU has AES accelerated hardware
instructions.
|
static int |
EVP_MD_block_size(long evp_md_const) |
static void |
EVP_MD_CTX_cleanup(NativeRef.EVP_MD_CTX ctx) |
static int |
EVP_MD_CTX_copy_ex(NativeRef.EVP_MD_CTX dst_ctx,
NativeRef.EVP_MD_CTX src_ctx) |
static long |
EVP_MD_CTX_create() |
static void |
EVP_MD_CTX_destroy(long ctx) |
static int |
EVP_MD_size(long evp_md_const) |
static int |
EVP_PKEY_cmp(NativeRef.EVP_PKEY pkey1,
NativeRef.EVP_PKEY pkey2) |
static void |
EVP_PKEY_CTX_free(long pkeyCtx) |
static void |
EVP_PKEY_CTX_set_rsa_mgf1_md(long ctx,
long evpMdRef) |
static void |
EVP_PKEY_CTX_set_rsa_oaep_label(long ctx,
byte[] label) |
static void |
EVP_PKEY_CTX_set_rsa_oaep_md(long ctx,
long evpMdRef) |
static void |
EVP_PKEY_CTX_set_rsa_padding(long ctx,
int pad) |
static void |
EVP_PKEY_CTX_set_rsa_pss_saltlen(long ctx,
int len) |
static long |
EVP_PKEY_decrypt_init(NativeRef.EVP_PKEY pkey) |
static int |
EVP_PKEY_decrypt(NativeRef.EVP_PKEY_CTX ctx,
byte[] out,
int outOffset,
byte[] input,
int inOffset,
int inLength) |
static long |
EVP_PKEY_encrypt_init(NativeRef.EVP_PKEY pkey) |
static int |
EVP_PKEY_encrypt(NativeRef.EVP_PKEY_CTX ctx,
byte[] out,
int outOffset,
byte[] input,
int inOffset,
int inLength) |
static void |
EVP_PKEY_free(long pkey) |
static long |
EVP_PKEY_new_EC_KEY(NativeRef.EC_GROUP groupRef,
NativeRef.EC_POINT pubkeyRef,
byte[] privkey) |
static long |
EVP_PKEY_new_RSA(byte[] n,
byte[] e,
byte[] d,
byte[] p,
byte[] q,
byte[] dmp1,
byte[] dmq1,
byte[] iqmp) |
static String |
EVP_PKEY_print_params(NativeRef.EVP_PKEY pkeyRef) |
static String |
EVP_PKEY_print_public(NativeRef.EVP_PKEY pkeyRef) |
static int |
EVP_PKEY_size(NativeRef.EVP_PKEY pkey) |
static int |
EVP_PKEY_type(NativeRef.EVP_PKEY pkey) |
static String[] |
get_cipher_names(String selection) |
static int |
get_EVP_CIPHER_CTX_buf_len(NativeRef.EVP_CIPHER_CTX ctx) |
static boolean |
get_EVP_CIPHER_CTX_final_used(NativeRef.EVP_CIPHER_CTX ctx) |
static byte[] |
get_ocsp_single_extension(byte[] ocspResponse,
String oid,
long x509Ref,
long issuerX509Ref) |
static byte[][] |
get_RSA_private_params(NativeRef.EVP_PKEY rsa) |
static byte[][] |
get_RSA_public_params(NativeRef.EVP_PKEY rsa) |
static String |
get_SSL_SESSION_tlsext_hostname(long sslSessionNativePointer) |
static byte[] |
get_X509_cert_info_enc(long x509ctx) |
static byte[] |
get_X509_CRL_crl_enc(long x509CrlCtx) |
static String[] |
get_X509_CRL_ext_oids(long x509ctx,
int critical) |
static String |
get_X509_CRL_sig_alg_oid(long x509CrlCtx) |
static byte[] |
get_X509_CRL_sig_alg_parameter(long x509CrlCtx) |
static byte[] |
get_X509_CRL_signature(long x509ctx) |
static int |
get_X509_ex_flags(long x509ctx) |
static boolean[] |
get_X509_ex_kusage(long x509ctx) |
static int |
get_X509_ex_pathlen(long x509ctx) |
static String[] |
get_X509_ex_xkusage(long x509ctx) |
static String[] |
get_X509_ext_oids(long x509ctx,
int critical) |
static Object[][] |
get_X509_GENERAL_NAME_stack(long x509ctx,
int type) |
static boolean[] |
get_X509_issuerUID(long x509ctx) |
static String |
get_X509_pubkey_oid(long x509ctx) |
static String[] |
get_X509_REVOKED_ext_oids(long x509ctx,
int critical) |
static long |
get_X509_REVOKED_revocationDate(long x509RevokedCtx)
Returns ASN1_TIME reference.
|
static String |
get_X509_sig_alg_oid(long x509ctx) |
static byte[] |
get_X509_sig_alg_parameter(long x509ctx) |
static byte[] |
get_X509_signature(long x509ctx) |
static boolean[] |
get_X509_subjectUID(long x509ctx) |
static long |
getDirectBufferAddress(Buffer buf)
Returns the starting address of the memory region referenced by the provided direct
Buffer or 0 if the provided buffer is not direct or if such access to direct
buffers is not supported by the platform. |
static long |
getECPrivateKeyWrapper(PrivateKey key,
NativeRef.EC_GROUP ecGroupRef) |
static long |
getRSAPrivateKeyWrapper(PrivateKey key,
byte[] modulus) |
static String[] |
getSupportedCipherSuites() |
static String[] |
getSupportedProtocols() |
static void |
HMAC_CTX_free(long ctx) |
static long |
HMAC_CTX_new() |
static byte[] |
HMAC_Final(NativeRef.HMAC_CTX ctx) |
static void |
HMAC_Init_ex(NativeRef.HMAC_CTX ctx,
byte[] key,
long evp_md) |
static void |
HMAC_Update(NativeRef.HMAC_CTX ctx,
byte[] in,
int inOffset,
int inLength) |
static void |
HMAC_UpdateDirect(NativeRef.HMAC_CTX ctx,
long inPtr,
int inLength) |
static byte[] |
i2d_PKCS7(long[] certs)
Returns an array of X509 or X509_CRL pointers.
|
static byte[] |
i2d_PKCS8_PRIV_KEY_INFO(NativeRef.EVP_PKEY pkey) |
static byte[] |
i2d_PUBKEY(NativeRef.EVP_PKEY pkey) |
static byte[] |
i2d_RSAPrivateKey(NativeRef.EVP_PKEY rsa) |
static byte[] |
i2d_RSAPublicKey(NativeRef.EVP_PKEY rsa) |
static byte[] |
i2d_SSL_SESSION(long sslSessionNativePointer) |
static byte[] |
i2d_X509_CRL(long x509CrlCtx) |
static byte[] |
i2d_X509_PUBKEY(long x509ctx)
Takes an X509 context not an X509_PUBKEY context.
|
static byte[] |
i2d_X509_REVOKED(long x509RevokedCtx) |
static byte[] |
i2d_X509(long x509ctx) |
static String |
OBJ_txt2nid_longName(String oid) |
static String |
OBJ_txt2nid_oid(String oid) |
static int |
OBJ_txt2nid(String oid) |
static long[] |
PEM_read_bio_PKCS7(long bioCtx,
int which)
Returns an array of X509 or X509_CRL pointers.
|
static long |
PEM_read_bio_PrivateKey(long bioCtx) |
static long |
PEM_read_bio_PUBKEY(long bioCtx) |
static long |
PEM_read_bio_X509_CRL(long bioCtx) |
static long |
PEM_read_bio_X509(long bioCtx) |
static void |
RAND_bytes(byte[] output) |
static long |
RSA_generate_key_ex(int modulusBits,
byte[] publicExponent) |
static int |
RSA_private_decrypt(int flen,
byte[] from,
byte[] to,
NativeRef.EVP_PKEY pkey,
int padding) |
static int |
RSA_private_encrypt(int flen,
byte[] from,
byte[] to,
NativeRef.EVP_PKEY pkey,
int padding) |
static int |
RSA_public_decrypt(int flen,
byte[] from,
byte[] to,
NativeRef.EVP_PKEY pkey,
int padding) |
static int |
RSA_public_encrypt(int flen,
byte[] from,
byte[] to,
NativeRef.EVP_PKEY pkey,
int padding) |
static int |
RSA_size(NativeRef.EVP_PKEY pkey) |
static void |
set_SSL_psk_client_callback_enabled(long ssl,
boolean enabled) |
static void |
set_SSL_psk_server_callback_enabled(long ssl,
boolean enabled) |
static void |
setEnabledCipherSuites(long ssl,
String[] cipherSuites) |
static void |
setEnabledProtocols(long ssl,
String[] protocols) |
static void |
SSL_accept_renegotiations(long sslNativePointer) |
static long |
SSL_BIO_new(long ssl) |
static void |
SSL_check_private_key(long ssl) |
static String |
SSL_CIPHER_get_kx_name(long cipherAddress) |
static void |
SSL_clear_error() |
static long |
SSL_clear_mode(long ssl,
long mode) |
static long |
SSL_clear_options(long ssl,
long options) |
static void |
SSL_configure_alpn(long sslNativePointer,
boolean clientMode,
byte[] alpnProtocols)
Sets the list of supported ALPN protocols in wire-format (length-prefixed 8-bit strings).
|
static void |
SSL_CTX_free(long ssl_ctx) |
static long |
SSL_CTX_new() |
static void |
SSL_CTX_set_ocsp_response(long ssl,
byte[] response) |
static void |
SSL_CTX_set_session_id_context(long ssl_ctx,
byte[] sid_ctx) |
static void |
SSL_CTX_set_signed_cert_timestamp_list(long ssl,
byte[] list) |
static void |
SSL_do_handshake(long sslNativePointer,
FileDescriptor fd,
NativeCrypto.SSLHandshakeCallbacks shc,
int timeoutMillis) |
static void |
SSL_enable_ocsp_stapling(long ssl) |
static void |
SSL_enable_signed_cert_timestamps(long ssl) |
static void |
SSL_enable_tls_channel_id(long ssl) |
static void |
SSL_free(long sslNativePointer) |
static long[] |
SSL_get_certificate(long sslNativePointer)
Returns the local X509 certificate references.
|
static long[] |
SSL_get_ciphers(long ssl)
Gets the list of cipher suites enabled for the provided
SSL instance. |
static String |
SSL_get_error_string(long errorNumber) |
static int |
SSL_get_error(long ssl,
int ret) |
static int |
SSL_get_last_error_number() |
static long |
SSL_get_mode(long ssl) |
static byte[] |
SSL_get_ocsp_response(long ssl) |
static long |
SSL_get_options(long ssl) |
static long[] |
SSL_get_peer_cert_chain(long sslNativePointer)
Returns the peer X509 certificate references.
|
static String |
SSL_get_servername(long sslNativePointer) |
static int |
SSL_get_shutdown(long sslNativePointer) |
static byte[] |
SSL_get_signed_cert_timestamp_list(long ssl) |
static byte[] |
SSL_get_tls_channel_id(long ssl) |
static byte[] |
SSL_get0_alpn_selected(long sslPointer)
Returns the selected ALPN protocol.
|
static long |
SSL_get0_session(long ssl) |
static long |
SSL_get1_session(long ssl) |
static void |
SSL_interrupt(long sslNativePointer) |
static long |
SSL_new(long ssl_ctx) |
static int |
SSL_pending_readable_bytes(long ssl) |
static int |
SSL_pending_written_bytes_in_BIO(long bio) |
static int |
SSL_read(long sslNativePointer,
FileDescriptor fd,
NativeCrypto.SSLHandshakeCallbacks shc,
byte[] b,
int off,
int len,
int readTimeoutMillis)
Reads with the native SSL_read function from the encrypted data stream
|
static void |
SSL_renegotiate(long sslNativePointer)
Currently only intended for forcing renegotiation for testing.
|
static String |
SSL_SESSION_cipher(long sslSessionNativePointer) |
static void |
SSL_SESSION_free(long sslSessionNativePointer) |
static long |
SSL_SESSION_get_time(long sslSessionNativePointer) |
static String |
SSL_SESSION_get_version(long sslSessionNativePointer) |
static boolean |
SSL_session_reused(long sslNativePointer) |
static byte[] |
SSL_SESSION_session_id(long sslSessionNativePointer) |
static void |
SSL_set_accept_state(long sslNativePointer) |
static void |
SSL_set_cipher_lists(long ssl,
String[] ciphers) |
static void |
SSL_set_client_CA_list(long ssl,
byte[][] asn1DerEncodedX500Principals) |
static void |
SSL_set_connect_state(long sslNativePointer) |
static long |
SSL_set_mode(long ssl,
long mode) |
static long |
SSL_set_options(long ssl,
long options) |
static void |
SSL_set_session_creation_enabled(long sslNativePointer,
boolean creationEnabled) |
static void |
SSL_set_session(long sslNativePointer,
long sslSessionNativePointer) |
static void |
SSL_set_tlsext_host_name(long sslNativePointer,
String hostname) |
static void |
SSL_set_verify(long sslNativePointer,
int mode) |
static void |
SSL_set1_tls_channel_id(long ssl,
NativeRef.EVP_PKEY pkey) |
static void |
SSL_shutdown_BIO(long sslNativePointer,
long sourceBioRef,
long sinkBioRef,
NativeCrypto.SSLHandshakeCallbacks shc) |
static void |
SSL_shutdown(long sslNativePointer,
FileDescriptor fd,
NativeCrypto.SSLHandshakeCallbacks shc) |
static void |
SSL_use_certificate(long ssl,
long[] x509refs) |
static void |
SSL_use_PrivateKey(long ssl,
NativeRef.EVP_PKEY pkey) |
static void |
SSL_use_psk_identity_hint(long ssl,
String identityHint) |
static void |
SSL_write(long sslNativePointer,
FileDescriptor fd,
NativeCrypto.SSLHandshakeCallbacks shc,
byte[] b,
int off,
int len,
int writeTimeoutMillis)
Writes with the native SSL_write function to the encrypted data stream.
|
static int |
X509_check_issued(long ctx,
long ctx2) |
static int |
X509_cmp(long x509ctx1,
long x509ctx2) |
static void |
X509_CRL_free(long x509CrlCtx) |
static byte[] |
X509_CRL_get_ext_oid(long x509CrlCtx,
String oid) |
static long |
X509_CRL_get_ext(long x509CrlCtx,
String oid) |
static byte[] |
X509_CRL_get_issuer_name(long x509CrlCtx) |
static long |
X509_CRL_get_lastUpdate(long x509CrlCtx) |
static long |
X509_CRL_get_nextUpdate(long x509CrlCtx) |
static long[] |
X509_CRL_get_REVOKED(long x509CrlCtx)
Returns an array of X509_REVOKED that are owned by the caller.
|
static long |
X509_CRL_get_version(long x509CrlCtx) |
static long |
X509_CRL_get0_by_cert(long x509CrlCtx,
long x509Ctx)
Returns X509_REVOKED reference that is not duplicated!
|
static long |
X509_CRL_get0_by_serial(long x509CrlCtx,
byte[] serial)
Returns X509_REVOKED reference that is not duplicated!
|
static void |
X509_CRL_print(long bioCtx,
long x509CrlCtx) |
static void |
X509_CRL_verify(long x509CrlCtx,
NativeRef.EVP_PKEY pkeyCtx) |
static void |
X509_delete_ext(long x509,
String oid) |
static long |
X509_dup(long x509ctx) |
static void |
X509_free(long x509ctx) |
static byte[] |
X509_get_ext_oid(long x509ctx,
String oid) |
static byte[] |
X509_get_issuer_name(long x509ctx) |
static long |
X509_get_notAfter(long x509ctx) |
static long |
X509_get_notBefore(long x509ctx) |
static long |
X509_get_pubkey(long x509ctx) |
static byte[] |
X509_get_serialNumber(long x509ctx) |
static byte[] |
X509_get_subject_name(long x509ctx) |
static long |
X509_get_version(long x509ctx) |
static int |
X509_NAME_hash_old(X500Principal principal) |
static int |
X509_NAME_hash(X500Principal principal) |
static String |
X509_NAME_print_ex(long x509nameCtx,
long flags) |
static void |
X509_print_ex(long bioCtx,
long x509ctx,
long nmflag,
long certflag) |
static long |
X509_REVOKED_dup(long x509RevokedCtx) |
static byte[] |
X509_REVOKED_get_ext_oid(long x509RevokedCtx,
String oid) |
static long |
X509_REVOKED_get_ext(long x509RevokedCtx,
String oid) |
static byte[] |
X509_REVOKED_get_serialNumber(long x509RevokedCtx) |
static void |
X509_REVOKED_print(long bioRef,
long x509RevokedCtx) |
static int |
X509_supported_extension(long x509ExtensionRef) |
static void |
X509_verify(long x509ctx,
NativeRef.EVP_PKEY pkeyCtx) |
public static final int GN_STACK_SUBJECT_ALT_NAME
public static final int GN_STACK_ISSUER_ALT_NAME
public static final int EXTENSION_TYPE_NON_CRITICAL
public static final int EXTENSION_TYPE_CRITICAL
public static final int PKCS7_CERTS
public static final int PKCS7_CRLS
public static final Map<String,String> OPENSSL_TO_STANDARD_CIPHER_SUITES
public static final Map<String,String> STANDARD_TO_OPENSSL_CIPHER_SUITES
public static final String TLS_EMPTY_RENEGOTIATION_INFO_SCSV
In the RI, its presence means that the SCSV is sent in the cipher suite list to indicate secure renegotiation support and its absense means to send an empty TLS renegotiation info extension instead.
However, OpenSSL doesn't provide an API to give this level of control, instead always sending the SCSV and always including the empty renegotiation info if TLS is used (as opposed to SSL). So we simply allow TLS_EMPTY_RENEGOTIATION_INFO_SCSV to be passed for compatibility as to provide the hint that we support secure renegotiation.
public static final String TLS_FALLBACK_SCSV
public static final String[] TLSV12_PROTOCOLS
public static final String[] TLSV11_PROTOCOLS
public static final String[] TLSV1_PROTOCOLS
public static final String[] DEFAULT_PROTOCOLS
public static final int SSL_VERIFY_NONE
public static final int SSL_VERIFY_PEER
public static final int SSL_VERIFY_FAIL_IF_NO_PEER_CERT
public static long EVP_PKEY_new_RSA(byte[] n,
byte[] e,
byte[] d,
byte[] p,
byte[] q,
byte[] dmp1,
byte[] dmq1,
byte[] iqmp)
public static int EVP_PKEY_size(NativeRef.EVP_PKEY pkey)
public static int EVP_PKEY_type(NativeRef.EVP_PKEY pkey)
public static String EVP_PKEY_print_public(NativeRef.EVP_PKEY pkeyRef)
public static String EVP_PKEY_print_params(NativeRef.EVP_PKEY pkeyRef)
public static void EVP_PKEY_free(long pkey)
public static int EVP_PKEY_cmp(NativeRef.EVP_PKEY pkey1, NativeRef.EVP_PKEY pkey2)
public static byte[] i2d_PKCS8_PRIV_KEY_INFO(NativeRef.EVP_PKEY pkey)
public static long d2i_PKCS8_PRIV_KEY_INFO(byte[] data)
public static byte[] i2d_PUBKEY(NativeRef.EVP_PKEY pkey)
public static long d2i_PUBKEY(byte[] data)
public static long PEM_read_bio_PUBKEY(long bioCtx)
public static long PEM_read_bio_PrivateKey(long bioCtx)
public static long getRSAPrivateKeyWrapper(PrivateKey key, byte[] modulus)
public static long getECPrivateKeyWrapper(PrivateKey key, NativeRef.EC_GROUP ecGroupRef)
public static long RSA_generate_key_ex(int modulusBits,
byte[] publicExponent)
public static int RSA_size(NativeRef.EVP_PKEY pkey)
public static int RSA_private_encrypt(int flen,
byte[] from,
byte[] to,
NativeRef.EVP_PKEY pkey,
int padding)
public static int RSA_public_decrypt(int flen,
byte[] from,
byte[] to,
NativeRef.EVP_PKEY pkey,
int padding)
throws BadPaddingException,
SignatureException
public static int RSA_public_encrypt(int flen,
byte[] from,
byte[] to,
NativeRef.EVP_PKEY pkey,
int padding)
public static int RSA_private_decrypt(int flen,
byte[] from,
byte[] to,
NativeRef.EVP_PKEY pkey,
int padding)
throws BadPaddingException,
SignatureException
public static byte[][] get_RSA_public_params(NativeRef.EVP_PKEY rsa)
public static byte[][] get_RSA_private_params(NativeRef.EVP_PKEY rsa)
public static byte[] i2d_RSAPublicKey(NativeRef.EVP_PKEY rsa)
public static byte[] i2d_RSAPrivateKey(NativeRef.EVP_PKEY rsa)
public static long EVP_PKEY_new_EC_KEY(NativeRef.EC_GROUP groupRef, NativeRef.EC_POINT pubkeyRef, byte[] privkey)
public static long EC_GROUP_new_by_curve_name(String curveName)
public static long EC_GROUP_new_arbitrary(byte[] p,
byte[] a,
byte[] b,
byte[] x,
byte[] y,
byte[] order,
int cofactor)
public static String EC_GROUP_get_curve_name(NativeRef.EC_GROUP groupRef)
public static byte[][] EC_GROUP_get_curve(NativeRef.EC_GROUP groupRef)
public static void EC_GROUP_clear_free(long groupRef)
public static long EC_GROUP_get_generator(NativeRef.EC_GROUP groupRef)
public static byte[] EC_GROUP_get_order(NativeRef.EC_GROUP groupRef)
public static int EC_GROUP_get_degree(NativeRef.EC_GROUP groupRef)
public static byte[] EC_GROUP_get_cofactor(NativeRef.EC_GROUP groupRef)
public static long EC_POINT_new(NativeRef.EC_GROUP groupRef)
public static void EC_POINT_clear_free(long pointRef)
public static byte[][] EC_POINT_get_affine_coordinates(NativeRef.EC_GROUP groupRef, NativeRef.EC_POINT pointRef)
public static void EC_POINT_set_affine_coordinates(NativeRef.EC_GROUP groupRef, NativeRef.EC_POINT pointRef, byte[] x, byte[] y)
public static long EC_KEY_generate_key(NativeRef.EC_GROUP groupRef)
public static long EC_KEY_get1_group(NativeRef.EVP_PKEY pkeyRef)
public static byte[] EC_KEY_get_private_key(NativeRef.EVP_PKEY keyRef)
public static long EC_KEY_get_public_key(NativeRef.EVP_PKEY keyRef)
public static int ECDH_compute_key(byte[] out,
int outOffset,
NativeRef.EVP_PKEY publicKeyRef,
NativeRef.EVP_PKEY privateKeyRef)
throws InvalidKeyException
InvalidKeyExceptionpublic static long EVP_get_digestbyname(String name)
public static int EVP_MD_size(long evp_md_const)
public static int EVP_MD_block_size(long evp_md_const)
public static long EVP_MD_CTX_create()
public static void EVP_MD_CTX_cleanup(NativeRef.EVP_MD_CTX ctx)
public static void EVP_MD_CTX_destroy(long ctx)
public static int EVP_MD_CTX_copy_ex(NativeRef.EVP_MD_CTX dst_ctx, NativeRef.EVP_MD_CTX src_ctx)
public static int EVP_DigestInit_ex(NativeRef.EVP_MD_CTX ctx, long evp_md)
public static void EVP_DigestUpdate(NativeRef.EVP_MD_CTX ctx, byte[] buffer, int offset, int length)
public static void EVP_DigestUpdateDirect(NativeRef.EVP_MD_CTX ctx, long ptr, int length)
public static int EVP_DigestFinal_ex(NativeRef.EVP_MD_CTX ctx, byte[] hash, int offset)
public static long EVP_DigestSignInit(NativeRef.EVP_MD_CTX ctx, long evpMdRef, NativeRef.EVP_PKEY key)
public static long EVP_DigestVerifyInit(NativeRef.EVP_MD_CTX ctx, long evpMdRef, NativeRef.EVP_PKEY key)
public static void EVP_DigestSignUpdate(NativeRef.EVP_MD_CTX ctx, byte[] buffer, int offset, int length)
public static void EVP_DigestSignUpdateDirect(NativeRef.EVP_MD_CTX ctx, long ptr, int length)
public static void EVP_DigestVerifyUpdate(NativeRef.EVP_MD_CTX ctx, byte[] buffer, int offset, int length)
public static void EVP_DigestVerifyUpdateDirect(NativeRef.EVP_MD_CTX ctx, long ptr, int length)
public static byte[] EVP_DigestSignFinal(NativeRef.EVP_MD_CTX ctx)
public static boolean EVP_DigestVerifyFinal(NativeRef.EVP_MD_CTX ctx, byte[] signature, int offset, int length)
public static long EVP_PKEY_encrypt_init(NativeRef.EVP_PKEY pkey)
public static int EVP_PKEY_encrypt(NativeRef.EVP_PKEY_CTX ctx, byte[] out, int outOffset, byte[] input, int inOffset, int inLength)
public static long EVP_PKEY_decrypt_init(NativeRef.EVP_PKEY pkey)
public static int EVP_PKEY_decrypt(NativeRef.EVP_PKEY_CTX ctx, byte[] out, int outOffset, byte[] input, int inOffset, int inLength)
public static void EVP_PKEY_CTX_free(long pkeyCtx)
public static void EVP_PKEY_CTX_set_rsa_padding(long ctx,
int pad)
throws InvalidAlgorithmParameterException
public static void EVP_PKEY_CTX_set_rsa_pss_saltlen(long ctx,
int len)
throws InvalidAlgorithmParameterException
public static void EVP_PKEY_CTX_set_rsa_mgf1_md(long ctx,
long evpMdRef)
throws InvalidAlgorithmParameterException
public static void EVP_PKEY_CTX_set_rsa_oaep_md(long ctx,
long evpMdRef)
throws InvalidAlgorithmParameterException
public static void EVP_PKEY_CTX_set_rsa_oaep_label(long ctx,
byte[] label)
throws InvalidAlgorithmParameterException
public static long EVP_get_cipherbyname(String string)
public static void EVP_CipherInit_ex(NativeRef.EVP_CIPHER_CTX ctx, long evpCipher, byte[] key, byte[] iv, boolean encrypting)
public static int EVP_CipherUpdate(NativeRef.EVP_CIPHER_CTX ctx, byte[] out, int outOffset, byte[] in, int inOffset, int inLength)
public static int EVP_CipherFinal_ex(NativeRef.EVP_CIPHER_CTX ctx, byte[] out, int outOffset) throws BadPaddingException, IllegalBlockSizeException
public static int EVP_CIPHER_iv_length(long evpCipher)
public static long EVP_CIPHER_CTX_new()
public static int EVP_CIPHER_CTX_block_size(NativeRef.EVP_CIPHER_CTX ctx)
public static int get_EVP_CIPHER_CTX_buf_len(NativeRef.EVP_CIPHER_CTX ctx)
public static boolean get_EVP_CIPHER_CTX_final_used(NativeRef.EVP_CIPHER_CTX ctx)
public static void EVP_CIPHER_CTX_set_padding(NativeRef.EVP_CIPHER_CTX ctx, boolean enablePadding)
public static void EVP_CIPHER_CTX_set_key_length(NativeRef.EVP_CIPHER_CTX ctx, int keyBitSize)
public static void EVP_CIPHER_CTX_free(long ctx)
public static long EVP_aead_aes_128_gcm()
public static long EVP_aead_aes_256_gcm()
public static int EVP_AEAD_max_overhead(long evpAead)
public static int EVP_AEAD_nonce_length(long evpAead)
public static int EVP_AEAD_max_tag_len(long evpAead)
public static int EVP_AEAD_CTX_seal(long evpAead,
byte[] key,
int tagLengthInBytes,
byte[] out,
int outOffset,
byte[] nonce,
byte[] in,
int inOffset,
int inLength,
byte[] ad)
throws BadPaddingException
BadPaddingExceptionpublic static int EVP_AEAD_CTX_open(long evpAead,
byte[] key,
int tagLengthInBytes,
byte[] out,
int outOffset,
byte[] nonce,
byte[] in,
int inOffset,
int inLength,
byte[] ad)
throws BadPaddingException
BadPaddingExceptionpublic static long HMAC_CTX_new()
public static void HMAC_CTX_free(long ctx)
public static void HMAC_Init_ex(NativeRef.HMAC_CTX ctx, byte[] key, long evp_md)
public static void HMAC_Update(NativeRef.HMAC_CTX ctx, byte[] in, int inOffset, int inLength)
public static void HMAC_UpdateDirect(NativeRef.HMAC_CTX ctx, long inPtr, int inLength)
public static byte[] HMAC_Final(NativeRef.HMAC_CTX ctx)
public static void RAND_bytes(byte[] output)
public static int OBJ_txt2nid(String oid)
public static int X509_NAME_hash(X500Principal principal)
public static int X509_NAME_hash_old(X500Principal principal)
public static String X509_NAME_print_ex(long x509nameCtx, long flags)
public static long d2i_X509_bio(long bioCtx)
public static long d2i_X509(byte[] encoded)
throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException
org.conscrypt.OpenSSLX509CertificateFactory.ParsingExceptionpublic static long PEM_read_bio_X509(long bioCtx)
public static byte[] i2d_X509(long x509ctx)
public static byte[] i2d_X509_PUBKEY(long x509ctx)
public static byte[] ASN1_seq_pack_X509(long[] x509CertRefs)
public static long[] ASN1_seq_unpack_X509_bio(long bioRef)
public static void X509_free(long x509ctx)
public static long X509_dup(long x509ctx)
public static int X509_cmp(long x509ctx1,
long x509ctx2)
public static void X509_print_ex(long bioCtx,
long x509ctx,
long nmflag,
long certflag)
public static byte[] X509_get_issuer_name(long x509ctx)
public static byte[] X509_get_subject_name(long x509ctx)
public static String get_X509_sig_alg_oid(long x509ctx)
public static byte[] get_X509_sig_alg_parameter(long x509ctx)
public static boolean[] get_X509_issuerUID(long x509ctx)
public static boolean[] get_X509_subjectUID(long x509ctx)
public static long X509_get_pubkey(long x509ctx)
throws NoSuchAlgorithmException,
InvalidKeyException
public static String get_X509_pubkey_oid(long x509ctx)
public static byte[] X509_get_ext_oid(long x509ctx,
String oid)
public static String[] get_X509_ext_oids(long x509ctx, int critical)
public static Object[][] get_X509_GENERAL_NAME_stack(long x509ctx, int type) throws CertificateParsingException
CertificateParsingExceptionpublic static boolean[] get_X509_ex_kusage(long x509ctx)
public static String[] get_X509_ex_xkusage(long x509ctx)
public static int get_X509_ex_pathlen(long x509ctx)
public static long X509_get_notBefore(long x509ctx)
public static long X509_get_notAfter(long x509ctx)
public static long X509_get_version(long x509ctx)
public static byte[] X509_get_serialNumber(long x509ctx)
public static void X509_verify(long x509ctx,
NativeRef.EVP_PKEY pkeyCtx)
throws BadPaddingException
BadPaddingExceptionpublic static byte[] get_X509_cert_info_enc(long x509ctx)
public static byte[] get_X509_signature(long x509ctx)
public static int get_X509_ex_flags(long x509ctx)
public static int X509_check_issued(long ctx,
long ctx2)
public static long[] d2i_PKCS7_bio(long bioCtx,
int which)
public static byte[] i2d_PKCS7(long[] certs)
public static long[] PEM_read_bio_PKCS7(long bioCtx,
int which)
public static long d2i_X509_CRL_bio(long bioCtx)
public static long PEM_read_bio_X509_CRL(long bioCtx)
public static byte[] i2d_X509_CRL(long x509CrlCtx)
public static void X509_CRL_free(long x509CrlCtx)
public static void X509_CRL_print(long bioCtx,
long x509CrlCtx)
public static String get_X509_CRL_sig_alg_oid(long x509CrlCtx)
public static byte[] get_X509_CRL_sig_alg_parameter(long x509CrlCtx)
public static byte[] X509_CRL_get_issuer_name(long x509CrlCtx)
public static long X509_CRL_get0_by_cert(long x509CrlCtx,
long x509Ctx)
public static long X509_CRL_get0_by_serial(long x509CrlCtx,
byte[] serial)
public static long[] X509_CRL_get_REVOKED(long x509CrlCtx)
public static String[] get_X509_CRL_ext_oids(long x509ctx, int critical)
public static byte[] X509_CRL_get_ext_oid(long x509CrlCtx,
String oid)
public static void X509_delete_ext(long x509,
String oid)
public static long X509_CRL_get_version(long x509CrlCtx)
public static long X509_CRL_get_ext(long x509CrlCtx,
String oid)
public static byte[] get_X509_CRL_signature(long x509ctx)
public static void X509_CRL_verify(long x509CrlCtx,
NativeRef.EVP_PKEY pkeyCtx)
public static byte[] get_X509_CRL_crl_enc(long x509CrlCtx)
public static long X509_CRL_get_lastUpdate(long x509CrlCtx)
public static long X509_CRL_get_nextUpdate(long x509CrlCtx)
public static long X509_REVOKED_dup(long x509RevokedCtx)
public static byte[] i2d_X509_REVOKED(long x509RevokedCtx)
public static String[] get_X509_REVOKED_ext_oids(long x509ctx, int critical)
public static byte[] X509_REVOKED_get_ext_oid(long x509RevokedCtx,
String oid)
public static byte[] X509_REVOKED_get_serialNumber(long x509RevokedCtx)
public static long X509_REVOKED_get_ext(long x509RevokedCtx,
String oid)
public static long get_X509_REVOKED_revocationDate(long x509RevokedCtx)
public static void X509_REVOKED_print(long bioRef,
long x509RevokedCtx)
public static int X509_supported_extension(long x509ExtensionRef)
public static void ASN1_TIME_to_Calendar(long asn1TimeCtx,
Calendar cal)
public static long create_BIO_InputStream(OpenSSLBIOInputStream is, boolean isFinite)
public static long create_BIO_OutputStream(OutputStream os)
public static int BIO_read(long bioRef,
byte[] buffer)
public static void BIO_write(long bioRef,
byte[] buffer,
int offset,
int length)
throws IOException
IOExceptionpublic static void BIO_free_all(long bioRef)
public static int EVP_has_aes_hardware()
public static long SSL_CTX_new()
public static String[] getSupportedCipherSuites()
public static void SSL_CTX_free(long ssl_ctx)
public static void SSL_CTX_set_session_id_context(long ssl_ctx,
byte[] sid_ctx)
public static long SSL_new(long ssl_ctx)
throws SSLException
SSLExceptionpublic static void SSL_enable_tls_channel_id(long ssl)
throws SSLException
SSLExceptionpublic static byte[] SSL_get_tls_channel_id(long ssl)
throws SSLException
SSLExceptionpublic static void SSL_set1_tls_channel_id(long ssl,
NativeRef.EVP_PKEY pkey)
public static void SSL_use_certificate(long ssl,
long[] x509refs)
public static void SSL_use_PrivateKey(long ssl,
NativeRef.EVP_PKEY pkey)
public static void SSL_check_private_key(long ssl)
throws SSLException
SSLExceptionpublic static void SSL_set_client_CA_list(long ssl,
byte[][] asn1DerEncodedX500Principals)
public static long SSL_get_mode(long ssl)
public static long SSL_set_mode(long ssl,
long mode)
public static long SSL_clear_mode(long ssl,
long mode)
public static long SSL_get_options(long ssl)
public static long SSL_set_options(long ssl,
long options)
public static long SSL_clear_options(long ssl,
long options)
public static void SSL_enable_signed_cert_timestamps(long ssl)
public static byte[] SSL_get_signed_cert_timestamp_list(long ssl)
public static void SSL_CTX_set_signed_cert_timestamp_list(long ssl,
byte[] list)
public static void SSL_enable_ocsp_stapling(long ssl)
public static byte[] SSL_get_ocsp_response(long ssl)
public static void SSL_CTX_set_ocsp_response(long ssl,
byte[] response)
public static void SSL_use_psk_identity_hint(long ssl,
String identityHint)
throws SSLException
SSLExceptionpublic static void set_SSL_psk_client_callback_enabled(long ssl,
boolean enabled)
public static void set_SSL_psk_server_callback_enabled(long ssl,
boolean enabled)
public static String[] getSupportedProtocols()
public static void setEnabledProtocols(long ssl,
String[] protocols)
public static void SSL_set_cipher_lists(long ssl,
String[] ciphers)
public static long[] SSL_get_ciphers(long ssl)
SSL instance.SSL_CIPHER references.public static void setEnabledCipherSuites(long ssl,
String[] cipherSuites)
public static void SSL_set_accept_state(long sslNativePointer)
public static void SSL_set_connect_state(long sslNativePointer)
public static void SSL_set_verify(long sslNativePointer,
int mode)
public static void SSL_set_session(long sslNativePointer,
long sslSessionNativePointer)
throws SSLException
SSLExceptionpublic static void SSL_set_session_creation_enabled(long sslNativePointer,
boolean creationEnabled)
throws SSLException
SSLExceptionpublic static boolean SSL_session_reused(long sslNativePointer)
public static void SSL_accept_renegotiations(long sslNativePointer)
throws SSLException
SSLExceptionpublic static void SSL_set_tlsext_host_name(long sslNativePointer,
String hostname)
throws SSLException
SSLExceptionpublic static String SSL_get_servername(long sslNativePointer)
public static byte[] SSL_get0_alpn_selected(long sslPointer)
null will be returned.public static void SSL_do_handshake(long sslNativePointer,
FileDescriptor fd,
NativeCrypto.SSLHandshakeCallbacks shc,
int timeoutMillis)
throws SSLException,
SocketTimeoutException,
CertificateException
public static void SSL_renegotiate(long sslNativePointer)
throws SSLException
SSLExceptionpublic static long[] SSL_get_certificate(long sslNativePointer)
public static long[] SSL_get_peer_cert_chain(long sslNativePointer)
public static int SSL_read(long sslNativePointer,
FileDescriptor fd,
NativeCrypto.SSLHandshakeCallbacks shc,
byte[] b,
int off,
int len,
int readTimeoutMillis)
throws IOException
IOExceptionpublic static void SSL_write(long sslNativePointer,
FileDescriptor fd,
NativeCrypto.SSLHandshakeCallbacks shc,
byte[] b,
int off,
int len,
int writeTimeoutMillis)
throws IOException
IOExceptionpublic static void SSL_interrupt(long sslNativePointer)
public static void SSL_shutdown(long sslNativePointer,
FileDescriptor fd,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
IOExceptionpublic static void SSL_shutdown_BIO(long sslNativePointer,
long sourceBioRef,
long sinkBioRef,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
IOExceptionpublic static int SSL_get_shutdown(long sslNativePointer)
public static void SSL_free(long sslNativePointer)
public static byte[] SSL_SESSION_session_id(long sslSessionNativePointer)
public static long SSL_SESSION_get_time(long sslSessionNativePointer)
public static String SSL_SESSION_get_version(long sslSessionNativePointer)
public static String SSL_SESSION_cipher(long sslSessionNativePointer)
public static String get_SSL_SESSION_tlsext_hostname(long sslSessionNativePointer)
public static void SSL_SESSION_free(long sslSessionNativePointer)
public static byte[] i2d_SSL_SESSION(long sslSessionNativePointer)
public static long d2i_SSL_SESSION(byte[] data)
throws IOException
IOExceptionpublic static long ERR_peek_last_error()
public static String SSL_CIPHER_get_kx_name(long cipherAddress)
public static byte[] get_ocsp_single_extension(byte[] ocspResponse,
String oid,
long x509Ref,
long issuerX509Ref)
public static long getDirectBufferAddress(Buffer buf)
Buffer or 0 if the provided buffer is not direct or if such access to direct
buffers is not supported by the platform.
NOTE: This method ignores the buffer's current position.
public static long SSL_BIO_new(long ssl)
throws SSLException
SSLExceptionpublic static int SSL_get_last_error_number()
public static int SSL_get_error(long ssl,
int ret)
public static String SSL_get_error_string(long errorNumber)
public static void SSL_clear_error()
public static int SSL_pending_readable_bytes(long ssl)
public static int SSL_pending_written_bytes_in_BIO(long bio)
public static long SSL_get0_session(long ssl)
public static long SSL_get1_session(long ssl)
public static void SSL_configure_alpn(long sslNativePointer,
boolean clientMode,
byte[] alpnProtocols)
throws IOException
IOExceptionpublic static int ENGINE_SSL_do_handshake(long ssl,
NativeCrypto.SSLHandshakeCallbacks shc)
SSL_do_handshake(long, java.io.FileDescriptor, org.conscrypt.NativeCrypto.SSLHandshakeCallbacks, int) used by OpenSSLEngineImpl. This version
does not lock and does no error preprocessing.public static int ENGINE_SSL_read_direct(long sslNativePointer,
long address,
int length,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
SSL_read(long, java.io.FileDescriptor, org.conscrypt.NativeCrypto.SSLHandshakeCallbacks, byte[], int, int, int) for a direct ByteBuffer used by OpenSSLEngineImpl. This version does not lock or and does no error pre-processing.IOExceptionpublic static int ENGINE_SSL_read_heap(long sslNativePointer,
byte[] destJava,
int destOffset,
int destLength,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
SSL_read(long, java.io.FileDescriptor, org.conscrypt.NativeCrypto.SSLHandshakeCallbacks, byte[], int, int, int) for a heap ByteBuffer used by OpenSSLEngineImpl. This version does not lock or and does no error pre-processing.IOExceptionpublic static int ENGINE_SSL_write_direct(long sslNativePointer,
long address,
int length,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
SSL_write(long, java.io.FileDescriptor, org.conscrypt.NativeCrypto.SSLHandshakeCallbacks, byte[], int, int, int) for a direct ByteBuffer used by OpenSSLEngineImpl. This version does not lock or and does no error pre-processing.IOExceptionpublic static int ENGINE_SSL_write_heap(long sslNativePointer,
byte[] sourceJava,
int sourceOffset,
int sourceLength,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
SSL_write(long, java.io.FileDescriptor, org.conscrypt.NativeCrypto.SSLHandshakeCallbacks, byte[], int, int, int) for a heap ByteBuffer used by OpenSSLEngineImpl. This version does not lock or and does no error pre-processing.IOExceptionpublic static int ENGINE_SSL_write_BIO_direct(long sslRef,
long bioRef,
long pos,
int length,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
ByteBuffer to the BIO.IOExceptionpublic static int ENGINE_SSL_write_BIO_heap(long sslRef,
long bioRef,
byte[] sourceJava,
int sourceOffset,
int sourceLength,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
IOExceptionpublic static int ENGINE_SSL_read_BIO_direct(long sslRef,
long bioRef,
long address,
int len,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
ByteBuffer.IOExceptionpublic static int ENGINE_SSL_read_BIO_heap(long sslRef,
long bioRef,
byte[] destJava,
int destOffset,
int destLength,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
IOExceptionpublic static void ENGINE_SSL_shutdown(long sslNativePointer,
NativeCrypto.SSLHandshakeCallbacks shc)
throws IOException
SSL_shutdown(long, java.io.FileDescriptor, org.conscrypt.NativeCrypto.SSLHandshakeCallbacks) used by OpenSSLEngineImpl. This version does not
lock.IOException