Lines Matching refs:selection

307 int ec_has(const void *keydata, int selection)  in ec_has()  argument
314 if ((selection & EC_POSSIBLE_SELECTIONS) == 0) in ec_has()
317 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) in ec_has()
319 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in ec_has()
321 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) in ec_has()
331 static int ec_match(const void *keydata1, const void *keydata2, int selection) in ec_match() argument
347 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) in ec_match()
350 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in ec_match()
353 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) { in ec_match()
363 && (selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) { in ec_match()
393 int common_import(void *keydata, int selection, const OSSL_PARAM params[], in common_import() argument
415 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) == 0) in common_import()
423 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in common_import()
425 selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0; in common_import()
429 if ((selection & OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS) != 0) in common_import()
436 int ec_import(void *keydata, int selection, const OSSL_PARAM params[]) in ec_import() argument
438 return common_import(keydata, selection, params, 0); in ec_import()
444 int sm2_import(void *keydata, int selection, const OSSL_PARAM params[]) in sm2_import() argument
446 return common_import(keydata, selection, params, 1); in sm2_import()
452 int ec_export(void *keydata, int selection, OSSL_CALLBACK *param_cb, in ec_export() argument
478 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) == 0) in ec_export()
480 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0 in ec_export()
481 && (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) == 0) in ec_export()
488 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) { in ec_export()
501 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in ec_export()
503 selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0; in ec_export()
507 if ((selection & OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS) != 0) in ec_export()
560 const OSSL_PARAM *ec_imexport_types(int selection) in ec_imexport_types() argument
564 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in ec_imexport_types()
566 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) in ec_imexport_types()
568 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) in ec_imexport_types()
570 if ((selection & OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS) != 0) in ec_imexport_types()
576 const OSSL_PARAM *ec_import_types(int selection) in ec_import_types() argument
578 return ec_imexport_types(selection); in ec_import_types()
582 const OSSL_PARAM *ec_export_types(int selection) in ec_export_types() argument
584 return ec_imexport_types(selection); in ec_export_types()
899 int sm2_validate(const void *keydata, int selection, int checktype) in sm2_validate() argument
908 if ((selection & EC_POSSIBLE_SELECTIONS) == 0) in sm2_validate()
915 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) in sm2_validate()
918 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) { in sm2_validate()
925 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in sm2_validate()
928 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_KEYPAIR) in sm2_validate()
938 int ec_validate(const void *keydata, int selection, int checktype) in ec_validate() argument
947 if ((selection & EC_POSSIBLE_SELECTIONS) == 0) in ec_validate()
954 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) { in ec_validate()
964 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) { in ec_validate()
971 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in ec_validate()
974 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_KEYPAIR) in ec_validate()
991 int selection; member
999 static void *ec_gen_init(void *provctx, int selection, in ec_gen_init() argument
1005 if (!ossl_prov_is_running() || (selection & (EC_POSSIBLE_SELECTIONS)) == 0) in ec_gen_init()
1010 gctx->selection = selection; in ec_gen_init()
1023 static void *sm2_gen_init(void *provctx, int selection, in sm2_gen_init() argument
1026 struct ec_gen_ctx *gctx = ec_gen_init(provctx, selection, params); in sm2_gen_init()
1323 if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in ec_gen()
1386 if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) in sm2_gen()
1455 static void *ec_dup(const void *keydata_from, int selection) in ec_dup() argument
1458 return ossl_ec_key_dup(keydata_from, selection); in ec_dup()