Lines Matching refs:pectx

86     PROV_ECDH_CTX *pectx;  in ecdh_newctx()  local
91 pectx = OPENSSL_zalloc(sizeof(*pectx)); in ecdh_newctx()
92 if (pectx == NULL) in ecdh_newctx()
95 pectx->libctx = PROV_LIBCTX_OF(provctx); in ecdh_newctx()
96 pectx->cofactor_mode = -1; in ecdh_newctx()
97 pectx->kdf_type = PROV_ECDH_KDF_NONE; in ecdh_newctx()
98 OSSL_FIPS_IND_INIT(pectx) in ecdh_newctx()
100 return (void *)pectx; in ecdh_newctx()
251 PROV_ECDH_CTX *pectx = (PROV_ECDH_CTX *)vpecdhctx; in ecdh_set_ctx_params() local
254 if (pectx == NULL) in ecdh_set_ctx_params()
259 if (!OSSL_FIPS_IND_SET_CTX_PARAM(pectx, OSSL_FIPS_IND_SETTABLE0, params, in ecdh_set_ctx_params()
262 if (!OSSL_FIPS_IND_SET_CTX_PARAM(pectx, OSSL_FIPS_IND_SETTABLE1, params, in ecdh_set_ctx_params()
265 if (!OSSL_FIPS_IND_SET_CTX_PARAM(pectx, OSSL_FIPS_IND_SETTABLE2, params, in ecdh_set_ctx_params()
279 pectx->cofactor_mode = mode; in ecdh_set_ctx_params()
289 pectx->kdf_type = PROV_ECDH_KDF_NONE; in ecdh_set_ctx_params()
291 pectx->kdf_type = PROV_ECDH_KDF_X9_63; in ecdh_set_ctx_params()
313 EVP_MD_free(pectx->kdf_md); in ecdh_set_ctx_params()
314 pectx->kdf_md = EVP_MD_fetch(pectx->libctx, name, mdprops); in ecdh_set_ctx_params()
315 if (pectx->kdf_md == NULL) in ecdh_set_ctx_params()
318 if (EVP_MD_xof(pectx->kdf_md)) { in ecdh_set_ctx_params()
323 if (!ossl_fips_ind_digest_exch_check(OSSL_FIPS_IND_GET(pectx), in ecdh_set_ctx_params()
324 OSSL_FIPS_IND_SETTABLE1, pectx->libctx, in ecdh_set_ctx_params()
325 pectx->kdf_md, "ECDH Set Ctx")) { in ecdh_set_ctx_params()
326 EVP_MD_free(pectx->kdf_md); in ecdh_set_ctx_params()
327 pectx->kdf_md = NULL; in ecdh_set_ctx_params()
339 pectx->kdf_outlen = outlen; in ecdh_set_ctx_params()
349 OPENSSL_free(pectx->kdf_ukm); in ecdh_set_ctx_params()
350 pectx->kdf_ukm = tmp_ukm; in ecdh_set_ctx_params()
351 pectx->kdf_ukmlen = tmp_ukmlen; in ecdh_set_ctx_params()
380 PROV_ECDH_CTX *pectx = (PROV_ECDH_CTX *)vpecdhctx; in ecdh_get_ctx_params() local
383 if (pectx == NULL) in ecdh_get_ctx_params()
388 int mode = pectx->cofactor_mode; in ecdh_get_ctx_params()
392 mode = EC_KEY_get_flags(pectx->k) & EC_FLAG_COFACTOR_ECDH ? 1 : 0; in ecdh_get_ctx_params()
403 switch (pectx->kdf_type) { in ecdh_get_ctx_params()
420 && !OSSL_PARAM_set_utf8_string(p, pectx->kdf_md == NULL in ecdh_get_ctx_params()
422 : EVP_MD_get0_name(pectx->kdf_md))) { in ecdh_get_ctx_params()
427 if (p != NULL && !OSSL_PARAM_set_size_t(p, pectx->kdf_outlen)) in ecdh_get_ctx_params()
432 !OSSL_PARAM_set_octet_ptr(p, pectx->kdf_ukm, pectx->kdf_ukmlen)) in ecdh_get_ctx_params()
434 if (!OSSL_FIPS_IND_GET_CTX_PARAM(pectx, params)) in ecdh_get_ctx_params()