Home
last modified time | relevance | path

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

/third_party/openssl/crypto/cms/
Dcms_rsa.c39 EVP_PKEY_CTX *pkctx; in rsa_cms_decrypt() local
48 pkctx = CMS_RecipientInfo_get0_pkey_ctx(ri); in rsa_cms_decrypt()
49 if (pkctx == NULL) in rsa_cms_decrypt()
93 if (EVP_PKEY_CTX_set_rsa_padding(pkctx, RSA_PKCS1_OAEP_PADDING) <= 0) in rsa_cms_decrypt()
95 if (EVP_PKEY_CTX_set_rsa_oaep_md(pkctx, md) <= 0) in rsa_cms_decrypt()
97 if (EVP_PKEY_CTX_set_rsa_mgf1_md(pkctx, mgf1md) <= 0) in rsa_cms_decrypt()
100 && EVP_PKEY_CTX_set0_rsa_oaep_label(pkctx, label, labellen) <= 0) in rsa_cms_decrypt()
116 EVP_PKEY_CTX *pkctx = CMS_RecipientInfo_get0_pkey_ctx(ri); in rsa_cms_encrypt() local
122 if (pkctx != NULL) { in rsa_cms_encrypt()
123 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/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/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)) { 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/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/src/
Dnode_crypto.cc4523 EVP_PKEY_CTX* pkctx, in ApplyRSAOptions() argument
4529 if (EVP_PKEY_CTX_set_rsa_padding(pkctx, padding) <= 0) in ApplyRSAOptions()
4532 if (EVP_PKEY_CTX_set_rsa_pss_saltlen(pkctx, salt_len.FromJust()) <= 0) in ApplyRSAOptions()
4686 EVPKeyCtxPointer pkctx(EVP_PKEY_CTX_new(pkey.get(), nullptr)); in Node_SignFinal() local
4687 if (pkctx && in Node_SignFinal()
4688 EVP_PKEY_sign_init(pkctx.get()) > 0 && in Node_SignFinal()
4689 ApplyRSAOptions(pkey, pkctx.get(), padding, pss_salt_len) && in Node_SignFinal()
4690 EVP_PKEY_CTX_set_signature_md(pkctx.get(), in Node_SignFinal()
4692 EVP_PKEY_sign(pkctx.get(), in Node_SignFinal()
4827 EVP_PKEY_CTX* pkctx = nullptr; in SignOneShot() local
[all …]
/third_party/openssl/apps/
Docsp.c1039 EVP_PKEY_CTX *pkctx = NULL; in make_ocsp_response() local
1140 if ( mctx == NULL || !EVP_DigestSignInit(mctx, &pkctx, rmd, NULL, rkey)) { in make_ocsp_response()
1147 if (pkey_ctrl_string(pkctx, sigopt) <= 0) { in make_ocsp_response()
/third_party/openssl/apps/lib/
Dapps.c2155 static int do_pkey_ctx_init(EVP_PKEY_CTX *pkctx, STACK_OF(OPENSSL_STRING) *opts) in do_pkey_ctx_init() argument
2164 if (pkey_ctrl_string(pkctx, opt) <= 0) { in do_pkey_ctx_init()
2215 EVP_PKEY_CTX *pkctx = NULL; in do_sign_init() local
2230 return EVP_DigestSignInit_ex(ctx, &pkctx, md, app_get0_libctx(), in do_sign_init()
2232 && do_pkey_ctx_init(pkctx, sigopts); in do_sign_init()