Lines Matching refs:params

170 static int dh_import(void *keydata, int selection, const OSSL_PARAM params[])  in dh_import()  argument
182 ok = ok && ossl_dh_params_fromdata(dh, params); in dh_import()
185 ok = ok && ossl_dh_key_fromdata(dh, params); in dh_import()
195 OSSL_PARAM *params = NULL; in dh_export() local
211 || (params = OSSL_PARAM_BLD_to_param(tmpl)) == NULL) { in dh_export()
215 ok = param_cb(params, cbarg); in dh_export()
216 OSSL_PARAM_free(params); in dh_export()
282 static ossl_inline int dh_get_params(void *key, OSSL_PARAM params[]) in dh_get_params() argument
287 if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL in dh_get_params()
290 if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL in dh_get_params()
293 if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL in dh_get_params()
296 if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY)) != NULL) { in dh_get_params()
305 return ossl_dh_params_todata(dh, NULL, params) in dh_get_params()
306 && ossl_dh_key_todata(dh, NULL, params); in dh_get_params()
335 static int dh_set_params(void *key, const OSSL_PARAM params[]) in dh_set_params() argument
340 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY); in dh_set_params()
413 const OSSL_PARAM params[], int type) in dh_gen_init_base() argument
446 if (!dh_gen_set_params(gctx, params)) { in dh_gen_init_base()
454 const OSSL_PARAM params[]) in dh_gen_init() argument
456 return dh_gen_init_base(provctx, selection, params, DH_FLAG_TYPE_DH); in dh_gen_init()
460 const OSSL_PARAM params[]) in dhx_gen_init() argument
462 return dh_gen_init_base(provctx, selection, params, DH_FLAG_TYPE_DHX); in dhx_gen_init()
491 static int dh_gen_common_set_params(void *genctx, const OSSL_PARAM params[]) in dh_gen_common_set_params() argument
498 if (params == NULL) in dh_gen_common_set_params()
501 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_TYPE); in dh_gen_common_set_params()
510 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_GROUP_NAME); in dh_gen_common_set_params()
522 if ((p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_PBITS)) != NULL in dh_gen_common_set_params()
525 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_DH_PRIV_LEN); in dh_gen_common_set_params()
565 static int dhx_gen_set_params(void *genctx, const OSSL_PARAM params[]) in dhx_gen_set_params() argument
570 if (!dh_gen_common_set_params(genctx, params)) in dhx_gen_set_params()
574 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_GINDEX); in dhx_gen_set_params()
577 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_PCOUNTER); in dhx_gen_set_params()
580 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_H); in dhx_gen_set_params()
583 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_SEED); in dhx_gen_set_params()
588 if ((p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_QBITS)) != NULL in dhx_gen_set_params()
591 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_DIGEST); in dhx_gen_set_params()
600 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_DIGEST_PROPS); in dhx_gen_set_params()
611 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_DH_GENERATOR); in dhx_gen_set_params()
619 static int dh_gen_set_params(void *genctx, const OSSL_PARAM params[]) in dh_gen_set_params() argument
624 if (!dh_gen_common_set_params(genctx, params)) in dh_gen_set_params()
627 p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_DH_GENERATOR); in dh_gen_set_params()
632 if (OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_GINDEX) != NULL in dh_gen_set_params()
633 || OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_PCOUNTER) != NULL in dh_gen_set_params()
634 || OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_H) != NULL in dh_gen_set_params()
635 || OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_SEED) != NULL in dh_gen_set_params()
636 || OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_QBITS) != NULL in dh_gen_set_params()
637 || OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_DIGEST) != NULL in dh_gen_set_params()
638 || OSSL_PARAM_locate_const(params, in dh_gen_set_params()
649 OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END }; in dh_gencb() local
651 params[0] = OSSL_PARAM_construct_int(OSSL_GEN_PARAM_POTENTIAL, &p); in dh_gencb()
652 params[1] = OSSL_PARAM_construct_int(OSSL_GEN_PARAM_ITERATION, &n); in dh_gencb()
654 return gctx->cb(params, gctx->cbarg); in dh_gencb()