Home
last modified time | relevance | path

Searched refs:pkctx (Results 1 – 22 of 22) sorted by relevance

/third_party/node/deps/openssl/openssl/crypto/cms/
Dcms_rsa.c41 EVP_PKEY_CTX *pkctx; in rsa_cms_decrypt() local
50 pkctx = CMS_RecipientInfo_get0_pkey_ctx(ri); in rsa_cms_decrypt()
51 if (pkctx == NULL) in rsa_cms_decrypt()
95 if (EVP_PKEY_CTX_set_rsa_padding(pkctx, RSA_PKCS1_OAEP_PADDING) <= 0) in rsa_cms_decrypt()
97 if (EVP_PKEY_CTX_set_rsa_oaep_md(pkctx, md) <= 0) in rsa_cms_decrypt()
99 if (EVP_PKEY_CTX_set_rsa_mgf1_md(pkctx, mgf1md) <= 0) in rsa_cms_decrypt()
102 && EVP_PKEY_CTX_set0_rsa_oaep_label(pkctx, label, labellen) <= 0) { in rsa_cms_decrypt()
121 EVP_PKEY_CTX *pkctx = CMS_RecipientInfo_get0_pkey_ctx(ri); in rsa_cms_encrypt() local
127 if (pkctx != NULL) { in rsa_cms_encrypt()
128 if (EVP_PKEY_CTX_get_rsa_padding(pkctx, &pad_mode) <= 0) in rsa_cms_encrypt()
[all …]
Dcms_sd.c951 EVP_PKEY_CTX *pkctx = NULL; in CMS_SignerInfo_verify_content() local
996 pkctx = EVP_PKEY_CTX_new_from_pkey(ossl_cms_ctx_get0_libctx(ctx), in CMS_SignerInfo_verify_content()
999 if (pkctx == NULL) in CMS_SignerInfo_verify_content()
1001 if (EVP_PKEY_verify_init(pkctx) <= 0) in CMS_SignerInfo_verify_content()
1003 if (EVP_PKEY_CTX_set_signature_md(pkctx, md) <= 0) in CMS_SignerInfo_verify_content()
1005 si->pctx = pkctx; in CMS_SignerInfo_verify_content()
1008 r = EVP_PKEY_verify(pkctx, si->signature->data, in CMS_SignerInfo_verify_content()
1017 EVP_PKEY_CTX_free(pkctx); in CMS_SignerInfo_verify_content()
/third_party/openssl/crypto/cms/
Dcms_rsa.c40 EVP_PKEY_CTX *pkctx; in rsa_cms_decrypt() local
49 pkctx = CMS_RecipientInfo_get0_pkey_ctx(ri); in rsa_cms_decrypt()
50 if (pkctx == NULL) in rsa_cms_decrypt()
94 if (EVP_PKEY_CTX_set_rsa_padding(pkctx, RSA_PKCS1_OAEP_PADDING) <= 0) in rsa_cms_decrypt()
96 if (EVP_PKEY_CTX_set_rsa_oaep_md(pkctx, md) <= 0) in rsa_cms_decrypt()
98 if (EVP_PKEY_CTX_set_rsa_mgf1_md(pkctx, mgf1md) <= 0) in rsa_cms_decrypt()
101 && EVP_PKEY_CTX_set0_rsa_oaep_label(pkctx, label, labellen) <= 0) in rsa_cms_decrypt()
117 EVP_PKEY_CTX *pkctx = CMS_RecipientInfo_get0_pkey_ctx(ri); in rsa_cms_encrypt() local
123 if (pkctx != NULL) { in rsa_cms_encrypt()
124 if (EVP_PKEY_CTX_get_rsa_padding(pkctx, &pad_mode) <= 0) in rsa_cms_encrypt()
[all …]
Dcms_sd.c943 EVP_PKEY_CTX *pkctx = NULL; in CMS_SignerInfo_verify_content() local
988 pkctx = EVP_PKEY_CTX_new_from_pkey(ossl_cms_ctx_get0_libctx(ctx), in CMS_SignerInfo_verify_content()
991 if (pkctx == NULL) in CMS_SignerInfo_verify_content()
993 if (EVP_PKEY_verify_init(pkctx) <= 0) in CMS_SignerInfo_verify_content()
995 if (EVP_PKEY_CTX_set_signature_md(pkctx, md) <= 0) in CMS_SignerInfo_verify_content()
997 si->pctx = pkctx; in CMS_SignerInfo_verify_content()
1000 r = EVP_PKEY_verify(pkctx, si->signature->data, in CMS_SignerInfo_verify_content()
1009 EVP_PKEY_CTX_free(pkctx); in CMS_SignerInfo_verify_content()
/third_party/openssl/crypto/evp/
Dp_verify.c24 EVP_PKEY_CTX *pkctx = NULL; in EVP_VerifyFinal_ex() local
46 pkctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, propq); in EVP_VerifyFinal_ex()
47 if (pkctx == NULL) in EVP_VerifyFinal_ex()
49 if (EVP_PKEY_verify_init(pkctx) <= 0) in EVP_VerifyFinal_ex()
51 if (EVP_PKEY_CTX_set_signature_md(pkctx, EVP_MD_CTX_get0_md(ctx)) <= 0) in EVP_VerifyFinal_ex()
53 i = EVP_PKEY_verify(pkctx, sigbuf, siglen, m, m_len); in EVP_VerifyFinal_ex()
55 EVP_PKEY_CTX_free(pkctx); in EVP_VerifyFinal_ex()
Dp_sign.c25 EVP_PKEY_CTX *pkctx = NULL; in EVP_SignFinal_ex() local
49 pkctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, propq); in EVP_SignFinal_ex()
50 if (pkctx == NULL) in EVP_SignFinal_ex()
52 if (EVP_PKEY_sign_init(pkctx) <= 0) in EVP_SignFinal_ex()
54 if (EVP_PKEY_CTX_set_signature_md(pkctx, EVP_MD_CTX_get0_md(ctx)) <= 0) in EVP_SignFinal_ex()
56 if (EVP_PKEY_sign(pkctx, sigret, &sltmp, m, m_len) <= 0) in EVP_SignFinal_ex()
61 EVP_PKEY_CTX_free(pkctx); in EVP_SignFinal_ex()
/third_party/node/deps/openssl/openssl/crypto/evp/
Dp_verify.c24 EVP_PKEY_CTX *pkctx = NULL; in EVP_VerifyFinal_ex() local
46 pkctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, propq); in EVP_VerifyFinal_ex()
47 if (pkctx == NULL) in EVP_VerifyFinal_ex()
49 if (EVP_PKEY_verify_init(pkctx) <= 0) in EVP_VerifyFinal_ex()
51 if (EVP_PKEY_CTX_set_signature_md(pkctx, EVP_MD_CTX_get0_md(ctx)) <= 0) in EVP_VerifyFinal_ex()
53 i = EVP_PKEY_verify(pkctx, sigbuf, siglen, m, m_len); in EVP_VerifyFinal_ex()
55 EVP_PKEY_CTX_free(pkctx); in EVP_VerifyFinal_ex()
Dp_sign.c25 EVP_PKEY_CTX *pkctx = NULL; in EVP_SignFinal_ex() local
49 pkctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, propq); in EVP_SignFinal_ex()
50 if (pkctx == NULL) in EVP_SignFinal_ex()
52 if (EVP_PKEY_sign_init(pkctx) <= 0) in EVP_SignFinal_ex()
54 if (EVP_PKEY_CTX_set_signature_md(pkctx, EVP_MD_CTX_get0_md(ctx)) <= 0) in EVP_SignFinal_ex()
56 if (EVP_PKEY_sign(pkctx, sigret, &sltmp, m, m_len) <= 0) in EVP_SignFinal_ex()
61 EVP_PKEY_CTX_free(pkctx); in EVP_SignFinal_ex()
/third_party/node/deps/openssl/openssl/crypto/rsa/
Drsa_ameth.c451 static RSA_PSS_PARAMS *rsa_ctx_to_pss(EVP_PKEY_CTX *pkctx) in rsa_ctx_to_pss() argument
454 EVP_PKEY *pk = EVP_PKEY_CTX_get0_pkey(pkctx); in rsa_ctx_to_pss()
457 if (EVP_PKEY_CTX_get_signature_md(pkctx, &sigmd) <= 0) in rsa_ctx_to_pss()
459 if (EVP_PKEY_CTX_get_rsa_mgf1_md(pkctx, &mgf1md) <= 0) in rsa_ctx_to_pss()
461 if (EVP_PKEY_CTX_get_rsa_pss_saltlen(pkctx, &saltlen) <= 0) in rsa_ctx_to_pss()
504 ASN1_STRING *ossl_rsa_ctx_to_pss_string(EVP_PKEY_CTX *pkctx) in ossl_rsa_ctx_to_pss_string() argument
506 RSA_PSS_PARAMS *pss = rsa_ctx_to_pss(pkctx); in ossl_rsa_ctx_to_pss_string()
523 int ossl_rsa_pss_to_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pkctx, in ossl_rsa_pss_to_ctx() argument
546 if (!EVP_DigestVerifyInit(ctx, &pkctx, md, NULL, pkey)) in ossl_rsa_pss_to_ctx()
550 if (EVP_PKEY_CTX_get_signature_md(pkctx, &checkmd) <= 0) in ossl_rsa_pss_to_ctx()
[all …]
/third_party/openssl/crypto/rsa/
Drsa_ameth.c448 static RSA_PSS_PARAMS *rsa_ctx_to_pss(EVP_PKEY_CTX *pkctx) in rsa_ctx_to_pss() argument
451 EVP_PKEY *pk = EVP_PKEY_CTX_get0_pkey(pkctx); in rsa_ctx_to_pss()
454 if (EVP_PKEY_CTX_get_signature_md(pkctx, &sigmd) <= 0) in rsa_ctx_to_pss()
456 if (EVP_PKEY_CTX_get_rsa_mgf1_md(pkctx, &mgf1md) <= 0) in rsa_ctx_to_pss()
458 if (EVP_PKEY_CTX_get_rsa_pss_saltlen(pkctx, &saltlen) <= 0) in rsa_ctx_to_pss()
501 ASN1_STRING *ossl_rsa_ctx_to_pss_string(EVP_PKEY_CTX *pkctx) in ossl_rsa_ctx_to_pss_string() argument
503 RSA_PSS_PARAMS *pss = rsa_ctx_to_pss(pkctx); in ossl_rsa_ctx_to_pss_string()
520 int ossl_rsa_pss_to_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pkctx, in ossl_rsa_pss_to_ctx() argument
543 if (!EVP_DigestVerifyInit(ctx, &pkctx, md, NULL, pkey)) in ossl_rsa_pss_to_ctx()
547 if (EVP_PKEY_CTX_get_signature_md(pkctx, &checkmd) <= 0) in ossl_rsa_pss_to_ctx()
[all …]
/third_party/node/src/crypto/
Dcrypto_sig.cc58 EVP_PKEY_CTX* pkctx, in ValidateDSAParameters() argument
64 if (EVP_PKEY_CTX_set_rsa_padding(pkctx, padding) <= 0) in ValidateDSAParameters()
67 if (EVP_PKEY_CTX_set_rsa_pss_saltlen(pkctx, salt_len.FromJust()) <= 0) in ValidateDSAParameters()
94 EVPKeyCtxPointer pkctx(EVP_PKEY_CTX_new(pkey.get(), nullptr)); in ValidateDSAParameters() local
95 if (pkctx && in ValidateDSAParameters()
96 EVP_PKEY_sign_init(pkctx.get()) && in ValidateDSAParameters()
97 ApplyRSAOptions(pkey, pkctx.get(), padding, pss_salt_len) && in ValidateDSAParameters()
98 EVP_PKEY_CTX_set_signature_md(pkctx.get(), EVP_MD_CTX_md(mdctx.get())) && in ValidateDSAParameters()
99 EVP_PKEY_sign(pkctx.get(), static_cast<unsigned char*>(sig->Data()), in ValidateDSAParameters()
523 EVPKeyCtxPointer pkctx(EVP_PKEY_CTX_new(pkey.get(), nullptr)); in VerifyFinal() local
[all …]
/third_party/node/deps/openssl/openssl/crypto/crmf/
Dcrmf_lib.c623 EVP_PKEY_CTX *pkctx = NULL; /* private key context */ in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() local
650 pkctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, propq); in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
651 if (pkctx != NULL && EVP_PKEY_decrypt_init(pkctx) > 0) { in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
656 if (EVP_PKEY_decrypt(pkctx, NULL, &eksize, in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
660 retval = EVP_PKEY_decrypt(pkctx, ek, &eksize, in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
708 EVP_PKEY_CTX_free(pkctx); in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
/third_party/openssl/crypto/crmf/
Dcrmf_lib.c623 EVP_PKEY_CTX *pkctx = NULL; /* private key context */ in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() local
650 pkctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, propq); in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
651 if (pkctx != NULL && EVP_PKEY_decrypt_init(pkctx) > 0) { in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
656 if (EVP_PKEY_decrypt(pkctx, NULL, &eksize, in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
660 retval = EVP_PKEY_decrypt(pkctx, ek, &eksize, in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
708 EVP_PKEY_CTX_free(pkctx); in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
/third_party/openssl/include/crypto/
Drsa.h113 ASN1_STRING *ossl_rsa_ctx_to_pss_string(EVP_PKEY_CTX *pkctx);
114 int ossl_rsa_pss_to_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pkctx,
/third_party/node/deps/openssl/openssl/include/crypto/
Drsa.h113 ASN1_STRING *ossl_rsa_ctx_to_pss_string(EVP_PKEY_CTX *pkctx);
114 int ossl_rsa_pss_to_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pkctx,
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/
Dcrypto_openssl.c2776 EVP_PKEY_CTX *pkctx; in crypto_ec_key_sign() local
2785 pkctx = EVP_PKEY_CTX_new((EVP_PKEY *) key, NULL); in crypto_ec_key_sign()
2786 if (!pkctx || in crypto_ec_key_sign()
2787 EVP_PKEY_sign_init(pkctx) <= 0 || in crypto_ec_key_sign()
2788 EVP_PKEY_sign(pkctx, wpabuf_put(sig_der, 0), &sig_len, in crypto_ec_key_sign()
2796 EVP_PKEY_CTX_free(pkctx); in crypto_ec_key_sign()
2859 EVP_PKEY_CTX *pkctx; in crypto_ec_key_verify_signature() local
2862 pkctx = EVP_PKEY_CTX_new((EVP_PKEY *) key, NULL); in crypto_ec_key_verify_signature()
2863 if (!pkctx || EVP_PKEY_verify_init(pkctx) <= 0) { in crypto_ec_key_verify_signature()
2864 EVP_PKEY_CTX_free(pkctx); in crypto_ec_key_verify_signature()
[all …]
/third_party/openssl/crypto/ocsp/
Docsp_srv.c220 EVP_PKEY_CTX *pkctx = NULL; in OCSP_basic_sign() local
226 if (!EVP_DigestSignInit_ex(ctx, &pkctx, EVP_MD_get0_name(dgst), in OCSP_basic_sign()
/third_party/node/deps/openssl/openssl/crypto/ocsp/
Docsp_srv.c220 EVP_PKEY_CTX *pkctx = NULL; in OCSP_basic_sign() local
226 if (!EVP_DigestSignInit_ex(ctx, &pkctx, EVP_MD_get0_name(dgst), in OCSP_basic_sign()
/third_party/openssl/apps/
Docsp.c1041 EVP_PKEY_CTX *pkctx = NULL; in make_ocsp_response() local
1142 if ( mctx == NULL || !EVP_DigestSignInit(mctx, &pkctx, rmd, NULL, rkey)) { in make_ocsp_response()
1149 if (pkey_ctrl_string(pkctx, sigopt) <= 0) { in make_ocsp_response()
/third_party/node/deps/openssl/openssl/apps/
Docsp.c1041 EVP_PKEY_CTX *pkctx = NULL; in make_ocsp_response() local
1142 if ( mctx == NULL || !EVP_DigestSignInit(mctx, &pkctx, rmd, NULL, rkey)) { in make_ocsp_response()
1149 if (pkey_ctrl_string(pkctx, sigopt) <= 0) { in make_ocsp_response()
/third_party/openssl/apps/lib/
Dapps.c2156 static int do_pkey_ctx_init(EVP_PKEY_CTX *pkctx, STACK_OF(OPENSSL_STRING) *opts) in do_pkey_ctx_init() argument
2165 if (pkey_ctrl_string(pkctx, opt) <= 0) { in do_pkey_ctx_init()
2216 EVP_PKEY_CTX *pkctx = NULL; in do_sign_init() local
2231 return EVP_DigestSignInit_ex(ctx, &pkctx, md, app_get0_libctx(), in do_sign_init()
2233 && do_pkey_ctx_init(pkctx, sigopts); in do_sign_init()
/third_party/node/deps/openssl/openssl/apps/lib/
Dapps.c2163 static int do_pkey_ctx_init(EVP_PKEY_CTX *pkctx, STACK_OF(OPENSSL_STRING) *opts) in do_pkey_ctx_init() argument
2172 if (pkey_ctrl_string(pkctx, opt) <= 0) { in do_pkey_ctx_init()
2223 EVP_PKEY_CTX *pkctx = NULL; in do_sign_init() local
2238 return EVP_DigestSignInit_ex(ctx, &pkctx, md, app_get0_libctx(), in do_sign_init()
2240 && do_pkey_ctx_init(pkctx, sigopts); in do_sign_init()