Lines Matching refs:pctx

684     EVP_PKEY_CTX *pctx = NULL;  in test_fromdata()  local
690 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, keytype, testpropq))) in test_fromdata()
692 if (!TEST_int_gt(EVP_PKEY_fromdata_init(pctx), 0) in test_fromdata()
693 || !TEST_int_gt(EVP_PKEY_fromdata(pctx, &pkey, EVP_PKEY_KEYPAIR, in test_fromdata()
722 EVP_PKEY_CTX_free(pctx); in test_fromdata()
1661 EVP_PKEY_CTX *pctx = NULL, *kctx = NULL; in test_EC_keygen_with_enc() local
1668 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "EC", NULL)) in test_EC_keygen_with_enc()
1669 || !TEST_true(EVP_PKEY_paramgen_init(pctx)) in test_EC_keygen_with_enc()
1670 || !TEST_true(EVP_PKEY_CTX_set_group_name(pctx, "P-256")) in test_EC_keygen_with_enc()
1671 || !TEST_true(EVP_PKEY_CTX_set_ec_param_enc(pctx, enc)) in test_EC_keygen_with_enc()
1672 || !TEST_true(EVP_PKEY_paramgen(pctx, &params)) in test_EC_keygen_with_enc()
1694 EVP_PKEY_CTX_free(pctx); in test_EC_keygen_with_enc()
1726 EVP_PKEY_CTX *pctx = NULL; in test_EVP_SM2_verify() local
1743 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_pkey(testctx, pkey, testpropq))) in test_EVP_SM2_verify()
1746 EVP_MD_CTX_set_pkey_ctx(mctx, pctx); in test_EVP_SM2_verify()
1754 if (!TEST_int_gt(EVP_PKEY_CTX_set1_id(pctx, id, strlen(id)), 0)) in test_EVP_SM2_verify()
1767 EVP_PKEY_CTX_free(pctx); in test_EVP_SM2_verify()
1778 EVP_PKEY_CTX *pctx = NULL; in test_EVP_SM2() local
1801 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, in test_EVP_SM2()
1805 if (!TEST_true(EVP_PKEY_paramgen_init(pctx) == 1)) in test_EVP_SM2()
1808 if (!TEST_true(EVP_PKEY_CTX_set_ec_paramgen_curve_nid(pctx, NID_sm2))) in test_EVP_SM2()
1811 if (!TEST_true(EVP_PKEY_paramgen(pctx, &pkeyparams))) in test_EVP_SM2()
1943 EVP_PKEY_CTX_free(pctx); in test_EVP_SM2()
2246 EVP_PKEY_CTX *pctx; in test_HKDF() local
2259 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "HKDF", testpropq))) in test_HKDF()
2267 if (!TEST_int_gt(EVP_PKEY_derive_init(pctx), 0) in test_HKDF()
2268 || !TEST_int_gt(EVP_PKEY_CTX_set_hkdf_md(pctx, EVP_sha256()), 0) in test_HKDF()
2269 || !TEST_int_gt(EVP_PKEY_CTX_set1_hkdf_salt(pctx, salt, in test_HKDF()
2271 || !TEST_int_gt(EVP_PKEY_CTX_set1_hkdf_key(pctx, key, in test_HKDF()
2273 || !TEST_int_gt(EVP_PKEY_CTX_add1_hkdf_info(pctx, info, in test_HKDF()
2275 || !TEST_int_gt(EVP_PKEY_derive(pctx, out, &outlen), 0) in test_HKDF()
2283 EVP_PKEY_CTX_free(pctx); in test_HKDF()
2290 EVP_PKEY_CTX *pctx; in test_emptyikm_HKDF() local
2303 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "HKDF", testpropq))) in test_emptyikm_HKDF()
2309 if (!TEST_int_gt(EVP_PKEY_derive_init(pctx), 0) in test_emptyikm_HKDF()
2310 || !TEST_int_gt(EVP_PKEY_CTX_set_hkdf_md(pctx, EVP_sha256()), 0) in test_emptyikm_HKDF()
2311 || !TEST_int_gt(EVP_PKEY_CTX_set1_hkdf_salt(pctx, salt, in test_emptyikm_HKDF()
2313 || !TEST_int_gt(EVP_PKEY_CTX_set1_hkdf_key(pctx, key, in test_emptyikm_HKDF()
2315 || !TEST_int_gt(EVP_PKEY_CTX_add1_hkdf_info(pctx, info, in test_emptyikm_HKDF()
2317 || !TEST_int_gt(EVP_PKEY_derive(pctx, out, &outlen), 0) in test_emptyikm_HKDF()
2324 EVP_PKEY_CTX_free(pctx); in test_emptyikm_HKDF()
2511 EVP_PKEY_CTX *pctx = NULL; in test_DSA_get_set_params() local
2519 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "DSA", NULL)) in test_DSA_get_set_params()
2538 if (!TEST_int_gt(EVP_PKEY_fromdata_init(pctx), 0) in test_DSA_get_set_params()
2539 || !TEST_int_gt(EVP_PKEY_fromdata(pctx, &pkey, EVP_PKEY_KEYPAIR, in test_DSA_get_set_params()
2550 EVP_PKEY_CTX_free(pctx); in test_DSA_get_set_params()
2578 EVP_PKEY_CTX *pctx = NULL; in test_RSA_get_set_params() local
2586 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "RSA", NULL)) in test_RSA_get_set_params()
2599 if (!TEST_int_gt(EVP_PKEY_fromdata_init(pctx), 0) in test_RSA_get_set_params()
2600 || !TEST_int_gt(EVP_PKEY_fromdata(pctx, &pkey, EVP_PKEY_KEYPAIR, in test_RSA_get_set_params()
2611 EVP_PKEY_CTX_free(pctx); in test_RSA_get_set_params()
2825 EVP_PKEY_CTX *pctx = NULL; in test_pkey_ctx_fail_without_provider() local
2866 pctx = EVP_PKEY_CTX_new_from_name(tmpctx, keytype, ""); in test_pkey_ctx_fail_without_provider()
2867 if (expect_null ? !TEST_ptr_null(pctx) : !TEST_ptr(pctx)) in test_pkey_ctx_fail_without_provider()
2876 EVP_PKEY_CTX_free(pctx); in test_pkey_ctx_fail_without_provider()
3871 EVP_PKEY_CTX *pctx = NULL; in test_custom_pmeth() local
3997 pctx = EVP_PKEY_CTX_new(pkey, NULL); in test_custom_pmeth()
3998 if (!TEST_ptr(pctx) in test_custom_pmeth()
3999 || !TEST_int_eq(EVP_PKEY_derive_init(pctx), 1) in test_custom_pmeth()
4000 || !TEST_int_ge(EVP_PKEY_CTX_ctrl(pctx, -1, -1, in test_custom_pmeth()
4004 || !TEST_int_ge(EVP_PKEY_derive_set_peer(pctx, pkey), 1) in test_custom_pmeth()
4005 || !TEST_int_ge(EVP_PKEY_derive(pctx, NULL, &reslen), 1) in test_custom_pmeth()
4007 || !TEST_int_ge(EVP_PKEY_derive(pctx, res, &reslen), 1)) in test_custom_pmeth()
4015 || !TEST_true(EVP_DigestSignInit(ctx, &pctx, md, NULL, pkey)) in test_custom_pmeth()
4016 || !TEST_int_ge(EVP_PKEY_CTX_ctrl(pctx, -1, -1, in test_custom_pmeth()
4037 EVP_PKEY_CTX_free(pctx); in test_custom_pmeth()