/external/conscrypt/common/src/jni/main/include/conscrypt/ |
native_crypto.h | 27 class NativeCrypto { 35 NativeCrypto() {} 36 ~NativeCrypto() {}
|
/external/conscrypt/common/src/main/java/org/conscrypt/ |
OAEPParameters.java | 70 readRef = NativeCrypto.asn1_read_init(bytes); 71 seqRef = NativeCrypto.asn1_read_sequence(readRef); 75 if (NativeCrypto.asn1_read_next_tag_is(seqRef, 2)) { 79 pSourceRef = NativeCrypto.asn1_read_tagged(seqRef); 80 pSourceSeqRef = NativeCrypto.asn1_read_sequence(pSourceRef); 81 String pSourceOid = NativeCrypto.asn1_read_oid(pSourceSeqRef); 86 NativeCrypto.asn1_read_octetstring(pSourceSeqRef)); 87 if (!NativeCrypto.asn1_read_is_empty(pSourceSeqRef)) { 91 NativeCrypto.asn1_read_free(pSourceSeqRef); 92 NativeCrypto.asn1_read_free(pSourceRef) [all...] |
PSSParameters.java | 52 readRef = NativeCrypto.asn1_read_init(bytes); 53 seqRef = NativeCrypto.asn1_read_sequence(readRef); 57 if (NativeCrypto.asn1_read_next_tag_is(seqRef, 2)) { 60 saltRef = NativeCrypto.asn1_read_tagged(seqRef); 61 saltLength = (int) NativeCrypto.asn1_read_uint64(saltRef); 63 NativeCrypto.asn1_read_free(saltRef); 66 if (NativeCrypto.asn1_read_next_tag_is(seqRef, 3)) { 70 trailerRef = NativeCrypto.asn1_read_tagged(seqRef); 71 trailerField = (int) NativeCrypto.asn1_read_uint64(trailerRef); 73 NativeCrypto.asn1_read_free(trailerRef) [all...] |
OpenSSLX509CRLEntry.java | 40 revocationDate = OpenSSLX509CRL.toDate(NativeCrypto.get_X509_REVOKED_revocationDate(mContext)); 46 NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 47 NativeCrypto.EXTENSION_TYPE_CRITICAL); 55 && (NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 56 NativeCrypto.EXTENSION_TYPE_NON_CRITICAL).length == 0)) { 65 return NativeCrypto.X509_REVOKED_get_ext_oid(mContext, oid); 71 NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 72 NativeCrypto.EXTENSION_TYPE_NON_CRITICAL); 80 && (NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 81 NativeCrypto.EXTENSION_TYPE_CRITICAL).length == 0)) [all...] |
GCMParameters.java | 81 readRef = NativeCrypto.asn1_read_init(bytes); 82 seqRef = NativeCrypto.asn1_read_sequence(readRef); 83 byte[] newIv = NativeCrypto.asn1_read_octetstring(seqRef); 85 if (!NativeCrypto.asn1_read_is_empty(seqRef)) { 86 newTlen = 8 * (int) NativeCrypto.asn1_read_uint64(seqRef); 88 if (!NativeCrypto.asn1_read_is_empty(seqRef) 89 || !NativeCrypto.asn1_read_is_empty(readRef)) { 95 NativeCrypto.asn1_read_free(seqRef); 96 NativeCrypto.asn1_read_free(readRef); 124 cbbRef = NativeCrypto.asn1_write_init() [all...] |
NativeRef.java | 68 NativeCrypto.EC_GROUP_clear_free(context); 79 NativeCrypto.EC_POINT_clear_free(context); 90 NativeCrypto.EVP_CIPHER_CTX_free(context); 101 NativeCrypto.EVP_MD_CTX_destroy(context); 112 NativeCrypto.EVP_PKEY_free(context); 123 NativeCrypto.EVP_PKEY_CTX_free(context); 134 NativeCrypto.HMAC_CTX_free(context); 145 NativeCrypto.SSL_SESSION_free(context);
|
OpenSSLX509CRL.java | 58 thisUpdate = toDate(NativeCrypto.X509_CRL_get_lastUpdate(mContext, this)); 59 nextUpdate = toDate(NativeCrypto.X509_CRL_get_nextUpdate(mContext, this)); 66 NativeCrypto.ASN1_TIME_to_Calendar(asn1time, calendar); 74 final long crlCtx = NativeCrypto.d2i_X509_CRL_bio(bis.getBioContext()); 92 certRefs = NativeCrypto.d2i_PKCS7_bio(bis.getBioContext(), NativeCrypto.PKCS7_CRLS); 113 final long crlCtx = NativeCrypto.PEM_read_bio_X509_CRL(bis.getBioContext()); 131 certRefs = NativeCrypto.PEM_read_bio_PKCS7(bis.getBioContext(), 132 NativeCrypto.PKCS7_CRLS); 152 NativeCrypto.get_X509_CRL_ext_oids(mContext, this, NativeCrypto.EXTENSION_TYPE_CRITICAL) [all...] |
OpenSSLX509Certificate.java | 71 notBefore = toDate(NativeCrypto.X509_get_notBefore(mContext, this)); 72 notAfter = toDate(NativeCrypto.X509_get_notAfter(mContext, this)); 85 NativeCrypto.ASN1_TIME_to_Calendar(asn1time, calendar); 95 final long certCtx = NativeCrypto.d2i_X509_bio(bis.getBioContext()); 110 return new OpenSSLX509Certificate(NativeCrypto.d2i_X509(encoded)); 123 certRefs = NativeCrypto.d2i_PKCS7_bio(bis.getBioContext(), NativeCrypto.PKCS7_CERTS); 151 final long certCtx = NativeCrypto.PEM_read_bio_X509(bis.getBioContext()); 170 certRefs = NativeCrypto.PEM_read_bio_PKCS7(bis.getBioContext(), 171 NativeCrypto.PKCS7_CERTS) [all...] |
IvParameters.java | 46 readRef = NativeCrypto.asn1_read_init(bytes); 47 byte[] newIv = NativeCrypto.asn1_read_octetstring(readRef); 48 if (!NativeCrypto.asn1_read_is_empty(readRef)) { 53 NativeCrypto.asn1_read_free(readRef); 83 cbbRef = NativeCrypto.asn1_write_init(); 84 NativeCrypto.asn1_write_octetstring(cbbRef, this.iv); 85 return NativeCrypto.asn1_write_finish(cbbRef); 87 NativeCrypto.asn1_write_cleanup(cbbRef); 90 NativeCrypto.asn1_write_free(cbbRef);
|
NativeSsl.java | 49 import org.conscrypt.NativeCrypto.SSLHandshakeCallbacks; 79 long ssl = NativeCrypto.SSL_new(ctx.sslCtxNativePointer, ctx); 92 NativeCrypto.SSL_set_session(ssl, this, sslSessionNativePointer); 96 return NativeCrypto.SSL_session_id(ssl, this); 100 return NativeCrypto.SSL_get_time(ssl, this); 104 return NativeCrypto.SSL_get_timeout(ssl, this); 108 NativeCrypto.SSL_set_timeout(ssl, this, millis); 112 return NativeCrypto.cipherSuiteToJava(NativeCrypto.SSL_get_current_cipher(ssl, this)); 116 byte[][] encoded = NativeCrypto.SSL_get0_peer_certificates(ssl, this) [all...] |
OpenSSLRandom.java | 40 NativeCrypto.RAND_bytes(bytes); 46 NativeCrypto.RAND_bytes(output);
|
EvpMdRef.java | 112 static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("md5"); 113 static final int SIZE_BYTES = NativeCrypto.EVP_MD_size(EVP_MD); 121 static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha1"); 122 static final int SIZE_BYTES = NativeCrypto.EVP_MD_size(EVP_MD); 129 static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha224"); 130 static final int SIZE_BYTES = NativeCrypto.EVP_MD_size(EVP_MD); 138 static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha256"); 139 static final int SIZE_BYTES = NativeCrypto.EVP_MD_size(EVP_MD); 147 static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha384"); 148 static final int SIZE_BYTES = NativeCrypto.EVP_MD_size(EVP_MD) [all...] |
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/ |
OAEPParameters.java | 74 readRef = NativeCrypto.asn1_read_init(bytes); 75 seqRef = NativeCrypto.asn1_read_sequence(readRef); 79 if (NativeCrypto.asn1_read_next_tag_is(seqRef, 2)) { 83 pSourceRef = NativeCrypto.asn1_read_tagged(seqRef); 84 pSourceSeqRef = NativeCrypto.asn1_read_sequence(pSourceRef); 85 String pSourceOid = NativeCrypto.asn1_read_oid(pSourceSeqRef); 90 NativeCrypto.asn1_read_octetstring(pSourceSeqRef)); 91 if (!NativeCrypto.asn1_read_is_empty(pSourceSeqRef)) { 95 NativeCrypto.asn1_read_free(pSourceSeqRef); 96 NativeCrypto.asn1_read_free(pSourceRef) [all...] |
OpenSSLX509CRLEntry.java | 41 revocationDate = OpenSSLX509CRL.toDate(NativeCrypto.get_X509_REVOKED_revocationDate(mContext)); 47 NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 48 NativeCrypto.EXTENSION_TYPE_CRITICAL); 56 && (NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 57 NativeCrypto.EXTENSION_TYPE_NON_CRITICAL).length == 0)) { 66 return NativeCrypto.X509_REVOKED_get_ext_oid(mContext, oid); 72 NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 73 NativeCrypto.EXTENSION_TYPE_NON_CRITICAL); 81 && (NativeCrypto.get_X509_REVOKED_ext_oids(mContext, 82 NativeCrypto.EXTENSION_TYPE_CRITICAL).length == 0)) [all...] |
GCMParameters.java | 85 readRef = NativeCrypto.asn1_read_init(bytes); 86 seqRef = NativeCrypto.asn1_read_sequence(readRef); 87 byte[] newIv = NativeCrypto.asn1_read_octetstring(seqRef); 89 if (!NativeCrypto.asn1_read_is_empty(seqRef)) { 90 newTlen = 8 * (int) NativeCrypto.asn1_read_uint64(seqRef); 92 if (!NativeCrypto.asn1_read_is_empty(seqRef) 93 || !NativeCrypto.asn1_read_is_empty(readRef)) { 99 NativeCrypto.asn1_read_free(seqRef); 100 NativeCrypto.asn1_read_free(readRef); 128 cbbRef = NativeCrypto.asn1_write_init() [all...] |
PSSParameters.java | 56 readRef = NativeCrypto.asn1_read_init(bytes); 57 seqRef = NativeCrypto.asn1_read_sequence(readRef); 61 if (NativeCrypto.asn1_read_next_tag_is(seqRef, 2)) { 64 saltRef = NativeCrypto.asn1_read_tagged(seqRef); 65 saltLength = (int) NativeCrypto.asn1_read_uint64(saltRef); 67 NativeCrypto.asn1_read_free(saltRef); 70 if (NativeCrypto.asn1_read_next_tag_is(seqRef, 3)) { 74 trailerRef = NativeCrypto.asn1_read_tagged(seqRef); 75 trailerField = (int) NativeCrypto.asn1_read_uint64(trailerRef); 77 NativeCrypto.asn1_read_free(trailerRef) [all...] |
NativeRef.java | 69 NativeCrypto.EC_GROUP_clear_free(context); 80 NativeCrypto.EC_POINT_clear_free(context); 91 NativeCrypto.EVP_CIPHER_CTX_free(context); 102 NativeCrypto.EVP_MD_CTX_destroy(context); 113 NativeCrypto.EVP_PKEY_free(context); 124 NativeCrypto.EVP_PKEY_CTX_free(context); 135 NativeCrypto.HMAC_CTX_free(context); 146 NativeCrypto.SSL_SESSION_free(context);
|
OpenSSLX509CRL.java | 59 thisUpdate = toDate(NativeCrypto.X509_CRL_get_lastUpdate(mContext, this)); 60 nextUpdate = toDate(NativeCrypto.X509_CRL_get_nextUpdate(mContext, this)); 67 NativeCrypto.ASN1_TIME_to_Calendar(asn1time, calendar); 75 final long crlCtx = NativeCrypto.d2i_X509_CRL_bio(bis.getBioContext()); 93 certRefs = NativeCrypto.d2i_PKCS7_bio(bis.getBioContext(), NativeCrypto.PKCS7_CRLS); 114 final long crlCtx = NativeCrypto.PEM_read_bio_X509_CRL(bis.getBioContext()); 132 certRefs = NativeCrypto.PEM_read_bio_PKCS7(bis.getBioContext(), 133 NativeCrypto.PKCS7_CRLS); 153 NativeCrypto.get_X509_CRL_ext_oids(mContext, this, NativeCrypto.EXTENSION_TYPE_CRITICAL) [all...] |
OpenSSLX509Certificate.java | 74 notBefore = toDate(NativeCrypto.X509_get_notBefore(mContext, this)); 75 notAfter = toDate(NativeCrypto.X509_get_notAfter(mContext, this)); 88 NativeCrypto.ASN1_TIME_to_Calendar(asn1time, calendar); 98 final long certCtx = NativeCrypto.d2i_X509_bio(bis.getBioContext()); 113 return new OpenSSLX509Certificate(NativeCrypto.d2i_X509(encoded)); 126 certRefs = NativeCrypto.d2i_PKCS7_bio(bis.getBioContext(), NativeCrypto.PKCS7_CERTS); 155 final long certCtx = NativeCrypto.PEM_read_bio_X509(bis.getBioContext()); 174 certRefs = NativeCrypto.PEM_read_bio_PKCS7(bis.getBioContext(), 175 NativeCrypto.PKCS7_CERTS) [all...] |
NativeSsl.java | 50 import com.android.org.conscrypt.NativeCrypto.SSLHandshakeCallbacks; 80 long ssl = NativeCrypto.SSL_new(ctx.sslCtxNativePointer, ctx); 93 NativeCrypto.SSL_set_session(ssl, this, sslSessionNativePointer); 97 return NativeCrypto.SSL_session_id(ssl, this); 101 return NativeCrypto.SSL_get_time(ssl, this); 105 return NativeCrypto.SSL_get_timeout(ssl, this); 109 NativeCrypto.SSL_set_timeout(ssl, this, millis); 113 return NativeCrypto.cipherSuiteToJava(NativeCrypto.SSL_get_current_cipher(ssl, this)); 117 byte[][] encoded = NativeCrypto.SSL_get0_peer_certificates(ssl, this) [all...] |
IvParameters.java | 52 readRef = NativeCrypto.asn1_read_init(bytes); 53 byte[] newIv = NativeCrypto.asn1_read_octetstring(readRef); 54 if (!NativeCrypto.asn1_read_is_empty(readRef)) { 59 NativeCrypto.asn1_read_free(readRef); 89 cbbRef = NativeCrypto.asn1_write_init(); 90 NativeCrypto.asn1_write_octetstring(cbbRef, this.iv); 91 return NativeCrypto.asn1_write_finish(cbbRef); 93 NativeCrypto.asn1_write_cleanup(cbbRef); 96 NativeCrypto.asn1_write_free(cbbRef);
|
EvpMdRef.java | 108 static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("md5"); 109 static final int SIZE_BYTES = NativeCrypto.EVP_MD_size(EVP_MD); 117 static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha1"); 118 static final int SIZE_BYTES = NativeCrypto.EVP_MD_size(EVP_MD); 125 static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha224"); 126 static final int SIZE_BYTES = NativeCrypto.EVP_MD_size(EVP_MD); 134 static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha256"); 135 static final int SIZE_BYTES = NativeCrypto.EVP_MD_size(EVP_MD); 143 static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha384"); 144 static final int SIZE_BYTES = NativeCrypto.EVP_MD_size(EVP_MD) [all...] |
/external/conscrypt/android/src/main/java/org/conscrypt/ |
NativeCryptoJni.java | 25 if ("com.google.android.gms.org.conscrypt".equals(NativeCrypto.class.getPackage().getName())) {
|
/external/conscrypt/openjdk/src/test/java/org/conscrypt/ |
NativeCryptoTest.java | 80 import org.conscrypt.NativeCrypto.SSLHandshakeCallbacks; 251 return new NativeRef.EVP_PKEY(NativeCrypto.EVP_PKEY_new_RSA( 260 assertEqualByteArrays(NativeCrypto.SSL_SESSION_session_id(expected), 261 NativeCrypto.SSL_SESSION_session_id(actual)); 274 NativeCrypto.X509_cmp(expected[i], null, actual[i], null); 284 NativeCrypto.EVP_PKEY_cmp(null, null); 292 NativeCrypto.EVP_PKEY_cmp(pkey1, null); 308 assertEquals("Same keys should be the equal", 1, NativeCrypto.EVP_PKEY_cmp(pkey1, pkey1)); 311 "Same keys should be the equal", 1, NativeCrypto.EVP_PKEY_cmp(pkey1, pkey1_copy)); 314 "Different keys should not be equal", 0, NativeCrypto.EVP_PKEY_cmp(pkey1, pkey2)) [all...] |
/external/conscrypt/repackaged/openjdk/src/test/java/com/android/org/conscrypt/ |
NativeCryptoTest.java | 81 import com.android.org.conscrypt.NativeCrypto.SSLHandshakeCallbacks; 255 return new NativeRef.EVP_PKEY(NativeCrypto.EVP_PKEY_new_RSA( 264 assertEqualByteArrays(NativeCrypto.SSL_SESSION_session_id(expected), 265 NativeCrypto.SSL_SESSION_session_id(actual)); 278 NativeCrypto.X509_cmp(expected[i], null, actual[i], null); 288 NativeCrypto.EVP_PKEY_cmp(null, null); 296 NativeCrypto.EVP_PKEY_cmp(pkey1, null); 312 assertEquals("Same keys should be the equal", 1, NativeCrypto.EVP_PKEY_cmp(pkey1, pkey1)); 315 "Same keys should be the equal", 1, NativeCrypto.EVP_PKEY_cmp(pkey1, pkey1_copy)); 318 "Different keys should not be equal", 0, NativeCrypto.EVP_PKEY_cmp(pkey1, pkey2)) [all...] |