Home
last modified time | relevance | path

Searched refs:evp_ctx (Results 1 – 7 of 7) sorted by relevance

/third_party/node/deps/openssl/openssl/crypto/crmf/
Dcrmf_lib.c614 EVP_CIPHER_CTX *evp_ctx = NULL; /* context for symmetric encryption */ in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() local
688 || (evp_ctx = EVP_CIPHER_CTX_new()) == NULL) in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
690 EVP_CIPHER_CTX_set_padding(evp_ctx, 0); in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
692 if (!EVP_DecryptInit(evp_ctx, cipher, ek, iv) in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
693 || !EVP_DecryptUpdate(evp_ctx, outbuf, &outlen, in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
696 || !EVP_DecryptFinal(evp_ctx, outbuf + outlen, &n)) { in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
710 EVP_CIPHER_CTX_free(evp_ctx); in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
/third_party/openssl/crypto/crmf/
Dcrmf_lib.c614 EVP_CIPHER_CTX *evp_ctx = NULL; /* context for symmetric encryption */ in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() local
688 || (evp_ctx = EVP_CIPHER_CTX_new()) == NULL) in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
690 EVP_CIPHER_CTX_set_padding(evp_ctx, 0); in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
692 if (!EVP_DecryptInit(evp_ctx, cipher, ek, iv) in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
693 || !EVP_DecryptUpdate(evp_ctx, outbuf, &outlen, in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
696 || !EVP_DecryptFinal(evp_ctx, outbuf + outlen, &n)) { in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
710 EVP_CIPHER_CTX_free(evp_ctx); in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
/third_party/node/deps/openssl/openssl/crypto/evp/
Dlegacy_sha.c72 static int shake_ctrl(EVP_MD_CTX *evp_ctx, int cmd, int p1, void *p2) in shake_ctrl() argument
76 if (evp_ctx == NULL) in shake_ctrl()
78 ctx = evp_ctx->md_data; in shake_ctrl()
/third_party/node/deps/openssl/openssl/crypto/pkcs7/
Dpk7_doit.c405 EVP_CIPHER_CTX *evp_ctx = NULL; in PKCS7_dataDecode() local
595 evp_ctx = NULL; in PKCS7_dataDecode()
596 BIO_get_cipher_ctx(etmp, &evp_ctx); in PKCS7_dataDecode()
597 if (EVP_CipherInit_ex(evp_ctx, cipher, NULL, NULL, NULL, 0) <= 0) in PKCS7_dataDecode()
599 if (EVP_CIPHER_asn1_to_param(evp_ctx, enc_alg->parameter) <= 0) in PKCS7_dataDecode()
602 len = EVP_CIPHER_CTX_get_key_length(evp_ctx); in PKCS7_dataDecode()
609 if (EVP_CIPHER_CTX_rand_key(evp_ctx, tkey) <= 0) in PKCS7_dataDecode()
617 if (eklen != EVP_CIPHER_CTX_get_key_length(evp_ctx)) { in PKCS7_dataDecode()
623 if (EVP_CIPHER_CTX_set_key_length(evp_ctx, eklen) <= 0) { in PKCS7_dataDecode()
633 if (EVP_CipherInit_ex(evp_ctx, NULL, NULL, ek, NULL, 0) <= 0) in PKCS7_dataDecode()
/third_party/openssl/crypto/pkcs7/
Dpk7_doit.c405 EVP_CIPHER_CTX *evp_ctx = NULL; in PKCS7_dataDecode() local
595 evp_ctx = NULL; in PKCS7_dataDecode()
596 BIO_get_cipher_ctx(etmp, &evp_ctx); in PKCS7_dataDecode()
597 if (EVP_CipherInit_ex(evp_ctx, cipher, NULL, NULL, NULL, 0) <= 0) in PKCS7_dataDecode()
599 if (EVP_CIPHER_asn1_to_param(evp_ctx, enc_alg->parameter) <= 0) in PKCS7_dataDecode()
602 len = EVP_CIPHER_CTX_get_key_length(evp_ctx); in PKCS7_dataDecode()
609 if (EVP_CIPHER_CTX_rand_key(evp_ctx, tkey) <= 0) in PKCS7_dataDecode()
617 if (eklen != EVP_CIPHER_CTX_get_key_length(evp_ctx)) { in PKCS7_dataDecode()
623 if (EVP_CIPHER_CTX_set_key_length(evp_ctx, eklen) <= 0) { in PKCS7_dataDecode()
633 if (EVP_CipherInit_ex(evp_ctx, NULL, NULL, ek, NULL, 0) <= 0) in PKCS7_dataDecode()
/third_party/openssl/crypto/evp/
Dlegacy_sha.c72 static int shake_ctrl(EVP_MD_CTX *evp_ctx, int cmd, int p1, void *p2) in shake_ctrl() argument
74 KECCAK1600_CTX *ctx = evp_ctx->md_data; in shake_ctrl()
/third_party/libcoap/src/
Dcoap_openssl.c3660 EVP_MD_CTX *evp_ctx = NULL; in coap_crypto_hash() local
3668 evp_ctx = EVP_MD_CTX_new(); in coap_crypto_hash()
3669 if (evp_ctx == NULL) in coap_crypto_hash()
3671 if (EVP_DigestInit_ex(evp_ctx, evp_md, NULL) == 0) in coap_crypto_hash()
3674 if (EVP_DigestUpdate(evp_ctx, data->s, data->length) == 0) in coap_crypto_hash()
3680 if (EVP_DigestFinal_ex(evp_ctx, dummy->s, &length) == 0) in coap_crypto_hash()
3686 EVP_MD_CTX_free(evp_ctx); in coap_crypto_hash()
3692 if (evp_ctx) in coap_crypto_hash()
3693 EVP_MD_CTX_free(evp_ctx); in coap_crypto_hash()