HomeSort by relevance Sort by last modified time
    Searched defs:NativeCrypto (Results 1 - 17 of 17) sorted by null

  /external/conscrypt/src/main/java/org/conscrypt/
OpenSSLECGroupContext.java 45 final long ctx = NativeCrypto.EC_GROUP_new_by_curve_name(curveName);
50 NativeCrypto.EC_GROUP_set_point_conversion_form(ctx,
51 NativeCrypto.POINT_CONVERSION_UNCOMPRESSED);
52 NativeCrypto.EC_GROUP_set_asn1_flag(ctx, NativeCrypto.OPENSSL_EC_NAMED_CURVE);
59 final long ctx = NativeCrypto.EC_GROUP_new_curve(type, p.toByteArray(), a.toByteArray(),
65 NativeCrypto.EC_GROUP_set_point_conversion_form(ctx,
66 NativeCrypto.POINT_CONVERSION_UNCOMPRESSED);
71 NativeCrypto.EC_POINT_new(ctx));
73 NativeCrypto.EC_POINT_set_affine_coordinates(ctx, generator.getContext()
    [all...]
OpenSSLMessageDigestJDK.java 60 OpenSSLDigestContext ctxLocal = new OpenSSLDigestContext(NativeCrypto.EVP_MD_CTX_create());
61 NativeCrypto.EVP_MD_CTX_init(ctxLocal);
62 NativeCrypto.EVP_DigestInit(ctxLocal, evp_md);
84 NativeCrypto.EVP_DigestUpdate(ctx, input, offset, len);
90 NativeCrypto.EVP_DigestFinal(ctx, result, 0);
96 private static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("md5");
97 private static final int SIZE = NativeCrypto.EVP_MD_size(EVP_MD);
104 private static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha1");
105 private static final int SIZE = NativeCrypto.EVP_MD_size(EVP_MD);
112 private static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha224")
    [all...]
SSLParametersImpl.java 244 enabledCipherSuites = NativeCrypto.checkEnabledCipherSuites(cipherSuites).clone();
259 enabledProtocols = NativeCrypto.checkEnabledProtocols(protocols).clone();
376 NativeCrypto.SSL_set_session(sslNativePointer,
394 NativeCrypto.SSL_set1_tls_channel_id(sslNativePointer,
398 NativeCrypto.SSL_enable_tls_channel_id(sslNativePointer);
438 NativeCrypto.SSL_use_certificate(sslNativePointer, x509refs);
443 NativeCrypto.SSL_use_PrivateKey(sslNativePointer, key.getPkeyContext());
453 NativeCrypto.SSL_check_private_key(sslNativePointer);
460 NativeCrypto.SSL_CTX_enable_npn(sslCtxNativePointer);
464 NativeCrypto.SSL_set_alpn_protos(sslNativePointer, alpnProtocols)
    [all...]
OpenSSLX509CRLEntry.java 40 NativeCrypto.get_X509_REVOKED_ext_oids(mContext,
41 NativeCrypto.EXTENSION_TYPE_CRITICAL);
49 && (NativeCrypto.get_X509_REVOKED_ext_oids(mContext,
50 NativeCrypto.EXTENSION_TYPE_NON_CRITICAL).length == 0)) {
59 return NativeCrypto.X509_REVOKED_get_ext_oid(mContext, oid);
65 NativeCrypto.get_X509_REVOKED_ext_oids(mContext,
66 NativeCrypto.EXTENSION_TYPE_NON_CRITICAL);
74 && (NativeCrypto.get_X509_REVOKED_ext_oids(mContext,
75 NativeCrypto.EXTENSION_TYPE_CRITICAL).length == 0)) {
85 NativeCrypto.get_X509_REVOKED_ext_oids(mContext
    [all...]
OpenSSLSignature.java 75 OpenSSLDigestContext ctxLocal = new OpenSSLDigestContext(NativeCrypto.EVP_MD_CTX_create());
76 NativeCrypto.EVP_MD_CTX_init(ctxLocal);
79 NativeCrypto.EVP_SignInit(ctxLocal, evpAlgorithm);
81 NativeCrypto.EVP_VerifyInit(ctxLocal, evpAlgorithm);
96 NativeCrypto.EVP_SignUpdate(ctxLocal, input, offset, len);
98 NativeCrypto.EVP_VerifyUpdate(ctxLocal, input, offset, len);
108 final int pkeyType = NativeCrypto.EVP_PKEY_type(pkey.getPkeyContext());
112 if (pkeyType != NativeCrypto.EVP_PKEY_RSA) {
118 if (pkeyType != NativeCrypto.EVP_PKEY_DSA) {
124 if (pkeyType != NativeCrypto.EVP_PKEY_EC)
    [all...]
ServerSessionContext.java 45 NativeCrypto.SSL_CTX_set_session_id_context(sslCtxNativePointer, new byte[] { ' ' });
OpenSSLMac.java 87 macKey = new OpenSSLKey(NativeCrypto.EVP_PKEY_new_mac_key(evp_pkey_type, keyBytes));
94 OpenSSLDigestContext ctxLocal = new OpenSSLDigestContext(NativeCrypto.EVP_MD_CTX_create());
95 NativeCrypto.EVP_MD_CTX_init(ctxLocal);
99 NativeCrypto.EVP_DigestSignInit(ctxLocal, evp_md, macKey.getPkeyContext());
114 NativeCrypto.EVP_DigestUpdate(ctxLocal, input, offset, len);
120 final byte[] output = NativeCrypto.EVP_DigestSignFinal(ctxLocal);
131 private static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("md5");
132 private static final int SIZE = NativeCrypto.EVP_MD_size(EVP_MD);
135 super(EVP_MD, SIZE, NativeCrypto.EVP_PKEY_HMAC);
140 private static final long EVP_MD = NativeCrypto.EVP_get_digestbyname("sha1")
    [all...]
OpenSSLX509CRL.java 58 final long crlCtx = NativeCrypto.d2i_X509_CRL_bio(bis.getBioContext());
76 certRefs = NativeCrypto.d2i_PKCS7_bio(bis.getBioContext(), NativeCrypto.PKCS7_CRLS);
97 final long crlCtx = NativeCrypto.PEM_read_bio_X509_CRL(bis.getBioContext());
115 certRefs = NativeCrypto.PEM_read_bio_PKCS7(bis.getBioContext(),
116 NativeCrypto.PKCS7_CRLS);
136 NativeCrypto.get_X509_CRL_ext_oids(mContext, NativeCrypto.EXTENSION_TYPE_CRITICAL);
144 && (NativeCrypto.get_X509_CRL_ext_oids(mContext,
145 NativeCrypto.EXTENSION_TYPE_NON_CRITICAL).length == 0))
    [all...]
OpenSSLEngine.java 26 NativeCrypto.ENGINE_load_dynamic();
41 engineCtx = NativeCrypto.ENGINE_by_id(engine);
46 NativeCrypto.ENGINE_add(engineCtx);
55 if (NativeCrypto.ENGINE_init(engineCtx) == 0) {
56 NativeCrypto.ENGINE_free(engineCtx);
66 final long keyRef = NativeCrypto.ENGINE_load_private_key(ctx, id);
84 final long keyRef = NativeCrypto.ENGINE_load_private_key(ctx, id);
104 NativeCrypto.ENGINE_finish(ctx);
105 NativeCrypto.ENGINE_free(ctx);
127 final String id = NativeCrypto.ENGINE_get_id(ctx)
    [all...]
OpenSSLSignatureRawRSA.java 100 int maxSize = NativeCrypto.RSA_size(key.getPkeyContext());
118 int maxSize = NativeCrypto.RSA_size(key.getPkeyContext());
141 NativeCrypto.RSA_private_encrypt(inputOffset, inputBuffer, outputBuffer,
142 key.getPkeyContext(), NativeCrypto.RSA_PKCS1_PADDING);
166 resultSize = NativeCrypto.RSA_public_decrypt(sigBytes.length, sigBytes,
167 outputBuffer, key.getPkeyContext(), NativeCrypto.RSA_PKCS1_PADDING);
OpenSSLX509Certificate.java 67 final long certCtx = NativeCrypto.d2i_X509_bio(bis.getBioContext());
80 final long certCtx = NativeCrypto.d2i_X509(encoded);
94 certRefs = NativeCrypto.d2i_PKCS7_bio(bis.getBioContext(), NativeCrypto.PKCS7_CERTS);
122 final long certCtx = NativeCrypto.PEM_read_bio_X509(bis.getBioContext());
141 certRefs = NativeCrypto.PEM_read_bio_PKCS7(bis.getBioContext(),
142 NativeCrypto.PKCS7_CERTS);
174 NativeCrypto.get_X509_ext_oids(mContext, NativeCrypto.EXTENSION_TYPE_CRITICAL);
182 && (NativeCrypto.get_X509_ext_oids(mContext
    [all...]
OpenSSLRSAPrivateKey.java 70 return new OpenSSLKey(NativeCrypto.EVP_PKEY_new_RSA(
85 byte[][] params = NativeCrypto.get_RSA_private_params(key.getPkeyContext());
98 return new OpenSSLKey(NativeCrypto.getRSAPrivateKeyWrapper(rsaPrivateKey, rsaPrivateKey
121 return new OpenSSLKey(NativeCrypto.EVP_PKEY_new_RSA(
139 readParams(NativeCrypto.get_RSA_private_params(key.getPkeyContext()));
185 return NativeCrypto.i2d_PKCS8_PRIV_KEY_INFO(key.getPkeyContext());
270 key = new OpenSSLKey(NativeCrypto.EVP_PKEY_new_RSA(
OpenSSLSocketImpl.java 59 implements NativeCrypto.SSLHandshakeCallbacks, SSLParametersImpl.AliasChooser,
271 final int seedLengthInBytes = NativeCrypto.RAND_SEED_LENGTH_IN_BYTES;
274 NativeCrypto.RAND_load_file("/dev/urandom", seedLengthInBytes);
276 NativeCrypto.RAND_seed(secureRandom.generateSeed(seedLengthInBytes));
286 sslNativePointer = NativeCrypto.SSL_new(sslCtxNativePointer);
291 NativeCrypto.SSL_set_session_creation_enabled(sslNativePointer,
318 sslSessionNativePointer = NativeCrypto.SSL_do_handshake(sslNativePointer,
439 @SuppressWarnings("unused") // used by NativeCrypto.SSLHandshakeCallbacks / client_cert_cb
459 @SuppressWarnings("unused") // used by NativeCrypto.SSLHandshakeCallbacks / info_callback
461 if (type != NativeCrypto.SSL_CB_HANDSHAKE_DONE)
    [all...]
OpenSSLSessionImpl.java 80 this(NativeCrypto.d2i_SSL_SESSION(derData),
113 id = NativeCrypto.SSL_SESSION_session_id(sslSessionNativePointer);
121 return NativeCrypto.i2d_SSL_SESSION(sslSessionNativePointer);
131 creationTime = NativeCrypto.SSL_SESSION_get_time(sslSessionNativePointer);
320 String name = NativeCrypto.SSL_SESSION_cipher(sslSessionNativePointer);
321 cipherSuite = NativeCrypto.OPENSSL_TO_STANDARD_CIPHER_SUITES.get(name);
336 protocol = NativeCrypto.SSL_SESSION_get_version(sslSessionNativePointer);
485 NativeCrypto.SSL_SESSION_free(sslSessionNativePointer);
OpenSSLEngineImpl.java 41 public class OpenSSLEngineImpl extends SSLEngine implements NativeCrypto.SSLHandshakeCallbacks,
155 sslNativePointer = NativeCrypto.SSL_new(sslCtxNativePointer);
163 NativeCrypto.SSL_set_connect_state(sslNativePointer);
165 NativeCrypto.SSL_set_accept_state(sslNativePointer);
296 return NativeCrypto.getSupportedCipherSuites();
301 return NativeCrypto.getSupportedProtocols();
322 return (NativeCrypto.SSL_get_shutdown(sslNativePointer)
323 & NativeCrypto.SSL_RECEIVED_SHUTDOWN) != 0;
334 return (NativeCrypto.SSL_get_shutdown(sslNativePointer)
335 & NativeCrypto.SSL_SENT_SHUTDOWN) != 0
    [all...]
NativeCrypto.java 46 public final class NativeCrypto {
54 if ("com.android.org.conscrypt".equals(NativeCrypto.class.getPackage().getName())) {
56 } else if ("com.google.android.gms.org.conscrypt".equals(NativeCrypto.class.getPackage().getName())) {
    [all...]
  /external/conscrypt/src/test/java/org/conscrypt/
NativeCryptoTest.java 59 import org.conscrypt.NativeCrypto.SSLHandshakeCallbacks;
60 import static org.conscrypt.NativeCrypto.SSL_MODE_CBC_RECORD_SPLITTING;
61 import static org.conscrypt.NativeCrypto.SSL_MODE_HANDSHAKE_CUTTHROUGH;
86 assertEquals(0, NativeCrypto.ERR_peek_last_error());
185 assertEqualByteArrays(NativeCrypto.SSL_SESSION_session_id(expected),
186 NativeCrypto.SSL_SESSION_session_id(actual));
199 NativeCrypto.X509_cmp(expected[i], actual[i]);
209 NativeCrypto.EVP_PKEY_cmp(NULL, NULL);
225 pkey1 = NativeCrypto.EVP_PKEY_new_RSA(privKey1.getModulus().toByteArray(),
235 pkey1_copy = NativeCrypto.EVP_PKEY_new_RSA(privKey1.getModulus().toByteArray()
    [all...]

Completed in 199 milliseconds