Lines Matching defs:pctx

696     EVP_PKEY_CTX *pctx = NULL;
699 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, keytype, testpropq)))
701 if (!TEST_int_gt(EVP_PKEY_fromdata_init(pctx), 0)
702 || !TEST_int_gt(EVP_PKEY_fromdata(pctx, &tmp_pkey, EVP_PKEY_KEYPAIR,
713 EVP_PKEY_CTX_free(pctx);
1800 EVP_PKEY_CTX *pctx = NULL, *kctx = NULL;
1807 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "EC", NULL))
1808 || !TEST_int_gt(EVP_PKEY_paramgen_init(pctx), 0)
1809 || !TEST_int_gt(EVP_PKEY_CTX_set_group_name(pctx, "P-256"), 0)
1810 || !TEST_int_gt(EVP_PKEY_CTX_set_ec_param_enc(pctx, enc), 0)
1811 || !TEST_true(EVP_PKEY_paramgen(pctx, &params))
1833 EVP_PKEY_CTX_free(pctx);
1865 EVP_PKEY_CTX *pctx = NULL;
1882 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_pkey(testctx, pkey, testpropq)))
1885 EVP_MD_CTX_set_pkey_ctx(mctx, pctx);
1893 if (!TEST_int_gt(EVP_PKEY_CTX_set1_id(pctx, id, strlen(id)), 0))
1906 EVP_PKEY_CTX_free(pctx);
1917 EVP_PKEY_CTX *pctx = NULL;
1940 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx,
1944 if (!TEST_true(EVP_PKEY_paramgen_init(pctx) == 1))
1947 if (!TEST_int_gt(EVP_PKEY_CTX_set_ec_paramgen_curve_nid(pctx, NID_sm2), 0))
1950 if (!TEST_true(EVP_PKEY_paramgen(pctx, &pkeyparams)))
2100 EVP_PKEY_CTX_free(pctx);
2403 EVP_PKEY_CTX *pctx;
2416 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "HKDF", testpropq)))
2424 if (!TEST_int_gt(EVP_PKEY_derive_init(pctx), 0)
2425 || !TEST_int_gt(EVP_PKEY_CTX_set_hkdf_md(pctx, EVP_sha256()), 0)
2426 || !TEST_int_gt(EVP_PKEY_CTX_set1_hkdf_salt(pctx, salt,
2428 || !TEST_int_gt(EVP_PKEY_CTX_set1_hkdf_key(pctx, key,
2430 || !TEST_int_gt(EVP_PKEY_CTX_add1_hkdf_info(pctx, info,
2432 || !TEST_int_gt(EVP_PKEY_derive(pctx, out, &outlen), 0)
2440 EVP_PKEY_CTX_free(pctx);
2447 EVP_PKEY_CTX *pctx;
2460 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "HKDF", testpropq)))
2466 if (!TEST_int_gt(EVP_PKEY_derive_init(pctx), 0)
2467 || !TEST_int_gt(EVP_PKEY_CTX_set_hkdf_md(pctx, EVP_sha256()), 0)
2468 || !TEST_int_gt(EVP_PKEY_CTX_set1_hkdf_salt(pctx, salt,
2470 || !TEST_int_gt(EVP_PKEY_CTX_set1_hkdf_key(pctx, key,
2472 || !TEST_int_gt(EVP_PKEY_CTX_add1_hkdf_info(pctx, info,
2474 || !TEST_int_gt(EVP_PKEY_derive(pctx, out, &outlen), 0)
2481 EVP_PKEY_CTX_free(pctx);
2668 EVP_PKEY_CTX *pctx = NULL;
2676 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "DSA", NULL))
2695 if (!TEST_int_gt(EVP_PKEY_fromdata_init(pctx), 0)
2696 || !TEST_int_gt(EVP_PKEY_fromdata(pctx, &pkey, EVP_PKEY_KEYPAIR,
2707 EVP_PKEY_CTX_free(pctx);
2735 EVP_PKEY_CTX *pctx = NULL;
2743 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "RSA", NULL))
2756 if (!TEST_int_gt(EVP_PKEY_fromdata_init(pctx), 0)
2757 || !TEST_int_gt(EVP_PKEY_fromdata(pctx, &pkey, EVP_PKEY_KEYPAIR,
2768 EVP_PKEY_CTX_free(pctx);
3037 EVP_PKEY_CTX *pctx = NULL;
3078 pctx = EVP_PKEY_CTX_new_from_name(tmpctx, keytype, "");
3079 if (expect_null ? !TEST_ptr_null(pctx) : !TEST_ptr(pctx))
3088 EVP_PKEY_CTX_free(pctx);
4134 EVP_PKEY_CTX *pctx = NULL;
4260 pctx = EVP_PKEY_CTX_new(pkey, NULL);
4261 if (!TEST_ptr(pctx)
4262 || !TEST_int_eq(EVP_PKEY_derive_init(pctx), 1)
4263 || !TEST_int_ge(EVP_PKEY_CTX_ctrl(pctx, -1, -1,
4267 || !TEST_int_ge(EVP_PKEY_derive_set_peer(pctx, pkey), 1)
4268 || !TEST_int_ge(EVP_PKEY_derive(pctx, NULL, &reslen), 1)
4270 || !TEST_int_ge(EVP_PKEY_derive(pctx, res, &reslen), 1))
4278 || !TEST_true(EVP_DigestSignInit(ctx, &pctx, md, NULL, pkey))
4279 || !TEST_int_ge(EVP_PKEY_CTX_ctrl(pctx, -1, -1,
4300 EVP_PKEY_CTX_free(pctx);