Lines Matching refs:selection
57 int selection;
129 static int dh_has(const void *keydata, int selection)
136 if ((selection & DH_POSSIBLE_SELECTIONS) == 0)
137 return 1; /* the selection is not missing */
139 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0)
141 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
143 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0)
148 static int dh_match(const void *keydata1, const void *keydata2, int selection)
157 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
160 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
170 && (selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
181 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
190 static int dh_import(void *keydata, int selection, const OSSL_PARAM params[])
198 if ((selection & DH_POSSIBLE_SELECTIONS) == 0)
204 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
206 selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0;
214 static int dh_export(void *keydata, int selection, OSSL_CALLBACK *param_cb,
229 if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0)
232 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
234 selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0;
290 static const OSSL_PARAM *dh_imexport_types(int selection)
294 if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0)
296 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0)
301 static const OSSL_PARAM *dh_import_types(int selection)
303 return dh_imexport_types(selection);
306 static const OSSL_PARAM *dh_export_types(int selection)
308 return dh_imexport_types(selection);
406 static int dh_validate(const void *keydata, int selection, int checktype)
414 if ((selection & DH_POSSIBLE_SELECTIONS) == 0)
417 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
429 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0)
432 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
435 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR)
441 static void *dh_gen_init_base(void *provctx, int selection,
450 if ((selection & (OSSL_KEYMGMT_SELECT_KEYPAIR
455 gctx->selection = selection;
482 static void *dh_gen_init(void *provctx, int selection,
485 return dh_gen_init_base(provctx, selection, params, DH_FLAG_TYPE_DH);
488 static void *dhx_gen_init(void *provctx, int selection,
491 return dh_gen_init_base(provctx, selection, params, DH_FLAG_TYPE_DHX);
748 if ((gctx->selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
766 if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
816 static void *dh_dup(const void *keydata_from, int selection)
819 return ossl_dh_dup(keydata_from, selection);