/openssl-master/crypto/evp/ |
A D | m_sigver.c | 348 if (pctx) in do_sigver_init() 349 *pctx = ctx->pctx; in do_sigver_init() 409 EVP_PKEY_CTX *pctx = ctx->pctx; in EVP_DigestSignUpdate() local 439 EVP_PKEY_CTX *pctx = ctx->pctx; in EVP_DigestVerifyUpdate() local 472 EVP_PKEY_CTX *dctx, *pctx = ctx->pctx; in EVP_DigestSignFinal() local 495 if (pctx == NULL || pctx->pmeth == NULL) { in EVP_DigestSignFinal() 502 && !ctx->pctx->pmeth->digest_custom(ctx->pctx, ctx)) in EVP_DigestSignFinal() 570 EVP_PKEY_CTX *pctx = ctx->pctx; in EVP_DigestSign() local 599 EVP_PKEY_CTX *dctx, *pctx = ctx->pctx; in EVP_DigestVerifyFinal() local 620 if (pctx == NULL || pctx->pmeth == NULL) { in EVP_DigestVerifyFinal() [all …]
|
A D | digest.c | 547 out->pctx = EVP_PKEY_CTX_dup(in->pctx); in EVP_MD_CTX_copy_ex() 602 if (in->pctx) { in EVP_MD_CTX_copy_ex() 603 out->pctx = EVP_PKEY_CTX_dup(in->pctx); in EVP_MD_CTX_copy_ex() 669 EVP_PKEY_CTX *pctx = ctx->pctx; in EVP_MD_CTX_set_params() local 672 if (pctx != NULL in EVP_MD_CTX_set_params() 706 pctx = ctx->pctx; in EVP_MD_CTX_settable_params() 707 if (pctx != NULL in EVP_MD_CTX_settable_params() 725 EVP_PKEY_CTX *pctx = ctx->pctx; in EVP_MD_CTX_get_params() local 728 if (pctx != NULL in EVP_MD_CTX_get_params() 762 pctx = ctx->pctx; in EVP_MD_CTX_gettable_params() [all …]
|
A D | p_seal.c | 27 EVP_PKEY_CTX *pctx = NULL; in EVP_SealInit() local 60 pctx = EVP_PKEY_CTX_new_from_pkey(libctx, pubk[i], NULL); in EVP_SealInit() 61 if (pctx == NULL) { in EVP_SealInit() 66 if (EVP_PKEY_encrypt_init(pctx) <= 0 in EVP_SealInit() 67 || EVP_PKEY_encrypt(pctx, ek[i], &keylen, key, keylen) <= 0) in EVP_SealInit() 70 EVP_PKEY_CTX_free(pctx); in EVP_SealInit() 72 pctx = NULL; in EVP_SealInit() 75 EVP_PKEY_CTX_free(pctx); in EVP_SealInit()
|
A D | p_open.c | 25 EVP_PKEY_CTX *pctx = NULL; in EVP_OpenInit() local 36 if ((pctx = EVP_PKEY_CTX_new(priv, NULL)) == NULL) { in EVP_OpenInit() 41 if (EVP_PKEY_decrypt_init(pctx) <= 0 in EVP_OpenInit() 42 || EVP_PKEY_decrypt(pctx, NULL, &keylen, ek, ekl) <= 0) in EVP_OpenInit() 50 if (EVP_PKEY_decrypt(pctx, key, &keylen, ek, ekl) <= 0) in EVP_OpenInit() 59 EVP_PKEY_CTX_free(pctx); in EVP_OpenInit()
|
A D | pmeth_lib.c | 478 if (pctx->engine && !ENGINE_init(pctx->engine)) { in EVP_PKEY_CTX_dup() 489 if (pctx->pkey != NULL) in EVP_PKEY_CTX_dup() 491 rctx->pkey = pctx->pkey; in EVP_PKEY_CTX_dup() 513 = pctx->op.kex.exchange->dupctx(pctx->op.kex.algctx); in EVP_PKEY_CTX_dup() 531 = pctx->op.sig.signature->dupctx(pctx->op.sig.algctx); in EVP_PKEY_CTX_dup() 549 = pctx->op.ciph.cipher->dupctx(pctx->op.ciph.algctx); in EVP_PKEY_CTX_dup() 567 = pctx->op.encap.kem->dupctx(pctx->op.encap.algctx); in EVP_PKEY_CTX_dup() 580 rctx->pmeth = pctx->pmeth; in EVP_PKEY_CTX_dup() 585 if (pctx->peerkey != NULL) in EVP_PKEY_CTX_dup() 594 provkey = evp_pkey_export_to_provider(pctx->pkey, pctx->libctx, in EVP_PKEY_CTX_dup() [all …]
|
A D | ctrl_params_translate.c | 169 EVP_PKEY_CTX *pctx; member 2517 int evp_pkey_ctx_ctrl_to_param(EVP_PKEY_CTX *pctx, in evp_pkey_ctx_ctrl_to_param() argument 2529 keytype = pctx->legacy_keytype; in evp_pkey_ctx_ctrl_to_param() 2540 if (pctx->pmeth != NULL in evp_pkey_ctx_ctrl_to_param() 2551 ctx.pctx = pctx; in evp_pkey_ctx_ctrl_to_param() 2593 int keytype = pctx->legacy_keytype; in evp_pkey_ctx_ctrl_str_to_param() 2594 int optype = pctx->operation == 0 ? -1 : pctx->operation; in evp_pkey_ctx_ctrl_str_to_param() 2617 ctx.pctx = pctx; in evp_pkey_ctx_ctrl_str_to_param() 2652 int keytype = pctx->legacy_keytype; in evp_pkey_ctx_setget_params_to_ctrl() 2653 int optype = pctx->operation == 0 ? -1 : pctx->operation; in evp_pkey_ctx_setget_params_to_ctrl() [all …]
|
/openssl-master/test/ |
A D | pkey_meth_kdf_test.c | 22 EVP_PKEY_CTX *pctx; in test_kdf_tls1_prf() local 30 if (EVP_PKEY_derive_init(pctx) <= 0) { in test_kdf_tls1_prf() 38 if (EVP_PKEY_CTX_set1_tls1_prf_secret(pctx, in test_kdf_tls1_prf() 43 if (EVP_PKEY_CTX_add1_tls1_prf_seed(pctx, in test_kdf_tls1_prf() 64 EVP_PKEY_CTX_free(pctx); in test_kdf_tls1_prf() 71 EVP_PKEY_CTX *pctx; in test_kdf_hkdf() local 79 if (EVP_PKEY_derive_init(pctx) <= 0) { in test_kdf_hkdf() 117 EVP_PKEY_CTX_free(pctx); in test_kdf_hkdf() 125 EVP_PKEY_CTX *pctx; in test_kdf_scrypt() local 133 if (EVP_PKEY_derive_init(pctx) <= 0) { in test_kdf_scrypt() [all …]
|
A D | evp_extra_test.c | 722 EVP_PKEY_CTX_free(pctx); in test_fromdata() 1694 EVP_PKEY_CTX_free(pctx); in test_EC_keygen_with_enc() 1767 EVP_PKEY_CTX_free(pctx); in test_EVP_SM2_verify() 1943 EVP_PKEY_CTX_free(pctx); in test_EVP_SM2() 2246 EVP_PKEY_CTX *pctx; in test_HKDF() local 2283 EVP_PKEY_CTX_free(pctx); in test_HKDF() 2290 EVP_PKEY_CTX *pctx; in test_emptyikm_HKDF() local 2324 EVP_PKEY_CTX_free(pctx); in test_emptyikm_HKDF() 2550 EVP_PKEY_CTX_free(pctx); in test_DSA_get_set_params() 2867 if (expect_null ? !TEST_ptr_null(pctx) : !TEST_ptr(pctx)) in test_pkey_ctx_fail_without_provider() [all …]
|
A D | bad_dtls_test.c | 70 EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_TLS1_PRF, NULL); in do_PRF() local 74 EVP_PKEY_derive_init(pctx); in do_PRF() 75 EVP_PKEY_CTX_set_tls1_prf_md(pctx, EVP_md5_sha1()); in do_PRF() 76 EVP_PKEY_CTX_set1_tls1_prf_secret(pctx, master_secret, sizeof(master_secret)); in do_PRF() 77 EVP_PKEY_CTX_add1_tls1_prf_seed(pctx, seed1, seed1_len); in do_PRF() 78 EVP_PKEY_CTX_add1_tls1_prf_seed(pctx, seed2, seed2_len); in do_PRF() 79 EVP_PKEY_CTX_add1_tls1_prf_seed(pctx, seed3, seed3_len); in do_PRF() 80 EVP_PKEY_derive(pctx, out, &outlen); in do_PRF() 81 EVP_PKEY_CTX_free(pctx); in do_PRF()
|
/openssl-master/crypto/cms/ |
A D | cms_ec.c | 22 EVP_PKEY_CTX *pctx = NULL; in pkey_type2param() local 48 if (pctx == NULL || EVP_PKEY_paramgen_init(pctx) <= 0) in pkey_type2param() 57 EVP_PKEY_CTX_free(pctx); in pkey_type2param() 66 EVP_PKEY_CTX_free(pctx); in pkey_type2param() 90 pk = EVP_PKEY_CTX_get0_pkey(pctx); in ecdh_cms_set_peerkey() 189 kekcipher = EVP_CIPHER_fetch(pctx->libctx, name, pctx->propquery); in ecdh_cms_set_shared_info() 220 EVP_PKEY_CTX *pctx; in ecdh_cms_decrypt() local 223 if (pctx == NULL) in ecdh_cms_decrypt() 250 EVP_PKEY_CTX *pctx; in ecdh_cms_encrypt() local 266 if (pctx == NULL) in ecdh_cms_encrypt() [all …]
|
A D | cms_dh.c | 19 static int dh_cms_set_peerkey(EVP_PKEY_CTX *pctx, in dh_cms_set_peerkey() argument 40 pk = EVP_PKEY_CTX_get0_pkey(pctx); in dh_cms_set_peerkey() 124 kekcipher = EVP_CIPHER_fetch(pctx->libctx, name, pctx->propquery); in dh_cms_set_shared_info() 137 if (EVP_PKEY_CTX_set0_dh_kdf_oid(pctx, in dh_cms_set_shared_info() 165 if (pctx == NULL) in dh_cms_decrypt() 168 if (!EVP_PKEY_CTX_get0_peerkey(pctx)) { in dh_cms_decrypt() 183 if (!dh_cms_set_shared_info(pctx, ri)) { in dh_cms_decrypt() 192 EVP_PKEY_CTX *pctx; in dh_cms_encrypt() local 208 pctx = CMS_RecipientInfo_get0_pkey_ctx(ri); in dh_cms_encrypt() 209 if (pctx == NULL) in dh_cms_encrypt() [all …]
|
A D | cms_kari.c | 165 EVP_PKEY_CTX *pctx; in CMS_RecipientInfo_kari_set0_pkey_and_peer() local 169 kari->pctx = NULL; in CMS_RecipientInfo_kari_set0_pkey_and_peer() 176 if (pctx == NULL || EVP_PKEY_derive_init(pctx) <= 0) in CMS_RecipientInfo_kari_set0_pkey_and_peer() 186 kari->pctx = pctx; in CMS_RecipientInfo_kari_set0_pkey_and_peer() 189 EVP_PKEY_CTX_free(pctx); in CMS_RecipientInfo_kari_set0_pkey_and_peer() 249 kari->pctx = NULL; in cms_kek_cipher() 294 if (pctx == NULL) in cms_kari_create_ephemeral_key() 302 if (pctx == NULL) in cms_kari_create_ephemeral_key() 306 kari->pctx = pctx; in cms_kari_create_ephemeral_key() 326 if (pctx == NULL) in cms_kari_set_originator_private_key() [all …]
|
A D | cms_env.c | 109 EVP_PKEY_CTX *pctx = ri->d.kari->pctx; in ossl_cms_env_asn1_ctrl() local 111 if (pctx == NULL) in ossl_cms_env_asn1_ctrl() 320 if (ktri->pctx == NULL) in cms_RecipientInfo_ktri_init() 459 EVP_PKEY_CTX *pctx; in cms_RecipientInfo_ktri_encrypt() local 473 pctx = ktri->pctx; in cms_RecipientInfo_ktri_encrypt() 475 if (pctx) { in cms_RecipientInfo_ktri_encrypt() 482 if (pctx == NULL) in cms_RecipientInfo_ktri_encrypt() 508 EVP_PKEY_CTX_free(pctx); in cms_RecipientInfo_ktri_encrypt() 509 ktri->pctx = NULL; in cms_RecipientInfo_ktri_encrypt() 565 if (ktri->pctx == NULL) in cms_RecipientInfo_ktri_decrypt() [all …]
|
A D | cms_sd.c | 335 si->pctx = NULL; in CMS_add1_signer() 545 return si->pctx; in CMS_SignerInfo_get0_pkey_ctx() 675 EVP_PKEY_CTX *pctx = NULL; in cms_SignerInfo_content_sign() local 713 } else if (si->pctx) { in cms_SignerInfo_content_sign() 719 pctx = si->pctx; in cms_SignerInfo_content_sign() 756 EVP_PKEY_CTX_free(pctx); in cms_SignerInfo_content_sign() 780 EVP_PKEY_CTX *pctx = NULL; in CMS_SignerInfo_sign() local 799 if (si->pctx) in CMS_SignerInfo_sign() 800 pctx = si->pctx; in CMS_SignerInfo_sign() 808 si->pctx = pctx; in CMS_SignerInfo_sign() [all …]
|
/openssl-master/crypto/asn1/ |
A D | tasn_prn.c | 115 const ASN1_PCTX *pctx); 119 const ASN1_PCTX *pctx); 125 if (pctx == NULL) in ASN1_item_print() 126 pctx = &default_pctx; in ASN1_item_print() 127 if (pctx->flags & ASN1_PCTX_FLAGS_NO_STRUCT_NAME) in ASN1_item_print() 149 parg.pctx = pctx; in asn1_item_print_ctx() 275 if (pctx->flags & ASN1_PCTX_FLAGS_NO_FIELD_NAME) in asn1_template_print_ctx() 315 pctx)) in asn1_template_print_ctx() 333 const ASN1_PCTX *pctx) in asn1_print_fsname() argument 347 if (pctx->flags & ASN1_PCTX_FLAGS_NO_FIELD_NAME) in asn1_print_fsname() [all …]
|
/openssl-master/doc/man3/ |
A D | EVP_PKEY_print_private.pod | 14 int indent, ASN1_PCTX *pctx); 16 int indent, ASN1_PCTX *pctx); 18 int indent, ASN1_PCTX *pctx); 20 int indent, ASN1_PCTX *pctx); 22 int indent, ASN1_PCTX *pctx); 24 int indent, ASN1_PCTX *pctx); 33 The I<pctx> parameter allows the print output to be finely tuned by using 34 ASN1 printing options. If I<pctx> is set to NULL then default values will 43 Currently no public key algorithms include any options in the I<pctx> parameter.
|
A D | EVP_PKEY_CTX_set_tls1_prf_md.pod | 13 int EVP_PKEY_CTX_set_tls1_prf_md(EVP_PKEY_CTX *pctx, const EVP_MD *md); 14 int EVP_PKEY_CTX_set1_tls1_prf_secret(EVP_PKEY_CTX *pctx, 16 int EVP_PKEY_CTX_add1_tls1_prf_seed(EVP_PKEY_CTX *pctx, 51 EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_TLS1_PRF, NULL); 76 EVP_PKEY_CTX *pctx; 80 pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_TLS1_PRF, NULL); 81 if (EVP_PKEY_derive_init(pctx) <= 0) 83 if (EVP_PKEY_CTX_set_tls1_prf_md(pctx, EVP_sha256()) <= 0) 85 if (EVP_PKEY_CTX_set1_tls1_prf_secret(pctx, "secret", 6) <= 0) 87 if (EVP_PKEY_CTX_add1_tls1_prf_seed(pctx, "seed", 4) <= 0) [all …]
|
A D | EVP_PKEY_CTX_set_hkdf_md.pod | 14 int EVP_PKEY_CTX_set_hkdf_mode(EVP_PKEY_CTX *pctx, int mode); 16 int EVP_PKEY_CTX_set_hkdf_md(EVP_PKEY_CTX *pctx, const EVP_MD *md); 100 EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, NULL); 127 EVP_PKEY_CTX *pctx; 130 pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, NULL); 132 if (EVP_PKEY_derive_init(pctx) <= 0) 134 if (EVP_PKEY_CTX_set_hkdf_md(pctx, EVP_sha256()) <= 0) 136 if (EVP_PKEY_CTX_set1_hkdf_salt(pctx, "salt", 4) <= 0) 138 if (EVP_PKEY_CTX_set1_hkdf_key(pctx, "secret", 6) <= 0) 140 if (EVP_PKEY_CTX_add1_hkdf_info(pctx, "label", 5) <= 0) [all …]
|
A D | EVP_PKEY_CTX_set_scrypt_N.pod | 16 int EVP_PKEY_CTX_set1_scrypt_salt(EVP_PKEY_CTX *pctx, unsigned char *salt, 19 int EVP_PKEY_CTX_set_scrypt_N(EVP_PKEY_CTX *pctx, uint64_t N); 21 int EVP_PKEY_CTX_set_scrypt_r(EVP_PKEY_CTX *pctx, uint64_t r); 23 int EVP_PKEY_CTX_set_scrypt_p(EVP_PKEY_CTX *pctx, uint64_t p); 25 int EVP_PKEY_CTX_set_scrypt_maxmem_bytes(EVP_PKEY_CTX *pctx,
|
/openssl-master/doc/man7/ |
A D | X25519.pod | 24 EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_X25519, NULL); 28 EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_X448, NULL); 49 EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_X25519, NULL); 50 EVP_PKEY_keygen_init(pctx); 51 EVP_PKEY_keygen(pctx, &pkey); 52 EVP_PKEY_CTX_free(pctx);
|
A D | EVP_PKEY-DSA.pod | 36 EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_from_name(NULL, "DSA", NULL); 45 EVP_PKEY_CTX *pctx = NULL; 47 pctx = EVP_PKEY_CTX_new_from_name(NULL, "DSA", NULL); 48 EVP_PKEY_paramgen_init(pctx); 55 EVP_PKEY_CTX_set_params(pctx, params); 57 EVP_PKEY_generate(pctx, ¶m_key); 58 EVP_PKEY_CTX_free(pctx);
|
A D | EVP_PKEY-SM2.pod | 45 EVP_PKEY_CTX_set1_id(pctx, id, id_len); 50 EVP_MD_CTX_set_pkey_ctx(mctx, pctx); 52 There is normally no need to pass a B<pctx> parameter to EVP_DigestSignInit() 70 pctx = EVP_PKEY_CTX_new(pkey, NULL); 71 EVP_PKEY_CTX_set1_id(pctx, id, id_len); 72 EVP_MD_CTX_set_pkey_ctx(mctx, pctx);
|
/openssl-master/test/helpers/ |
A D | predefined_dhparams.c | 21 EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_from_name(libctx, type, NULL); in get_dh_from_pg_bn() local 26 if (pctx == NULL || EVP_PKEY_fromdata_init(pctx) <= 0) in get_dh_from_pg_bn() 38 || EVP_PKEY_fromdata(pctx, &dhpkey, EVP_PKEY_KEY_PARAMETERS, params) <= 0) in get_dh_from_pg_bn() 42 EVP_PKEY_CTX_free(pctx); in get_dh_from_pg_bn()
|
/openssl-master/apps/ |
A D | testdsa.h | 220 EVP_PKEY_CTX *pctx; in get_dsa() local 239 if ((pctx = EVP_PKEY_CTX_new_from_name(NULL, "DSA", NULL)) == NULL) in get_dsa() 265 if (EVP_PKEY_fromdata_init(pctx) <= 0 in get_dsa() 266 || EVP_PKEY_fromdata(pctx, &pkey, EVP_PKEY_KEYPAIR, in get_dsa() 277 EVP_PKEY_CTX_free(pctx); in get_dsa()
|
A D | genpkey.c | 20 static int init_keygen_file(EVP_PKEY_CTX **pctx, const char *file, ENGINE *e, 234 static int init_keygen_file(EVP_PKEY_CTX **pctx, const char *file, ENGINE *e, in init_keygen_file() argument 240 if (*pctx) { in init_keygen_file() 268 *pctx = ctx; in init_keygen_file() 280 int init_gen_str(EVP_PKEY_CTX **pctx, in init_gen_str() argument 287 if (*pctx) { in init_gen_str() 308 *pctx = ctx; in init_gen_str()
|