Lines Matching refs:selection
56 int selection;
130 static int dsa_has(const void *keydata, int selection)
137 if ((selection & DSA_POSSIBLE_SELECTIONS) == 0)
138 return 1; /* the selection is not missing */
140 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0)
142 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
144 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0)
149 static int dsa_match(const void *keydata1, const void *keydata2, int selection)
158 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
161 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
171 && (selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
182 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
191 static int dsa_import(void *keydata, int selection, const OSSL_PARAM params[])
199 if ((selection & DSA_POSSIBLE_SELECTIONS) == 0)
205 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
207 selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0;
215 static int dsa_export(void *keydata, int selection, OSSL_CALLBACK *param_cb,
230 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;
288 static const OSSL_PARAM *dsa_imexport_types(int selection)
292 if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0)
294 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0)
299 static const OSSL_PARAM *dsa_import_types(int selection)
301 return dsa_imexport_types(selection);
304 static const OSSL_PARAM *dsa_export_types(int selection)
306 return dsa_imexport_types(selection);
375 static int dsa_validate(const void *keydata, int selection, int checktype)
383 if ((selection & DSA_POSSIBLE_SELECTIONS) == 0)
386 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0)
389 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0)
392 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
396 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR)
402 static void *dsa_gen_init(void *provctx, int selection,
408 if (!ossl_prov_is_running() || (selection & DSA_POSSIBLE_SELECTIONS) == 0)
412 gctx->selection = selection;
594 if ((gctx->selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
603 if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
648 static void *dsa_dup(const void *keydata_from, int selection)
651 return ossl_dsa_dup(keydata_from, selection);