Lines Matching refs:selection
58 int selection; member
130 static int dh_has(const void *keydata, int selection) in dh_has() argument
137 if ((selection & DH_POSSIBLE_SELECTIONS) == 0) in dh_has()
140 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) in dh_has()
142 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in dh_has()
144 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) in dh_has()
149 static int dh_match(const void *keydata1, const void *keydata2, int selection) in dh_match() argument
158 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in dh_match()
161 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) { in dh_match()
171 && (selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) { in dh_match()
182 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) { in dh_match()
191 static int dh_import(void *keydata, int selection, const OSSL_PARAM params[]) in dh_import() argument
199 if ((selection & DH_POSSIBLE_SELECTIONS) == 0) in dh_import()
205 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in dh_import()
207 selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0; in dh_import()
215 static int dh_export(void *keydata, int selection, OSSL_CALLBACK *param_cb, in dh_export() argument
226 if ((selection & DH_POSSIBLE_SELECTIONS) == 0) in dh_export()
233 if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0) in dh_export()
236 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in dh_export()
238 selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0; in dh_export()
294 static const OSSL_PARAM *dh_imexport_types(int selection) in dh_imexport_types() argument
298 if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0) in dh_imexport_types()
300 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) in dh_imexport_types()
305 static const OSSL_PARAM *dh_import_types(int selection) in dh_import_types() argument
307 return dh_imexport_types(selection); in dh_import_types()
310 static const OSSL_PARAM *dh_export_types(int selection) in dh_export_types() argument
312 return dh_imexport_types(selection); in dh_export_types()
412 static int dh_validate(const void *keydata, int selection, int checktype) in dh_validate() argument
420 if ((selection & DH_POSSIBLE_SELECTIONS) == 0) in dh_validate()
423 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) { in dh_validate()
435 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) in dh_validate()
438 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in dh_validate()
441 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) in dh_validate()
447 static void *dh_gen_init_base(void *provctx, int selection, in dh_gen_init_base() argument
456 if ((selection & (OSSL_KEYMGMT_SELECT_KEYPAIR in dh_gen_init_base()
461 gctx->selection = selection; in dh_gen_init_base()
488 static void *dh_gen_init(void *provctx, int selection, in dh_gen_init() argument
491 return dh_gen_init_base(provctx, selection, params, DH_FLAG_TYPE_DH); in dh_gen_init()
494 static void *dhx_gen_init(void *provctx, int selection, in dhx_gen_init() argument
497 return dh_gen_init_base(provctx, selection, params, DH_FLAG_TYPE_DHX); in dhx_gen_init()
768 if ((gctx->selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) { in dh_gen()
786 if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in dh_gen()
836 static void *dh_dup(const void *keydata_from, int selection) in dh_dup() argument
839 return ossl_dh_dup(keydata_from, selection); in dh_dup()