Lines Matching refs:selection

115 static int rsa_has(const void *keydata, int selection)
122 if ((selection & RSA_POSSIBLE_SELECTIONS) == 0)
123 return 1; /* the selection is not missing */
126 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0)
128 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0)
130 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
135 static int rsa_match(const void *keydata1, const void *keydata2, int selection)
146 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
149 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
159 && (selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
173 static int rsa_import(void *keydata, int selection, const OSSL_PARAM params[])
183 if ((selection & RSA_POSSIBLE_SELECTIONS) == 0)
188 if ((selection & OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS) != 0)
193 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
195 selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0;
203 static int rsa_export(void *keydata, int selection,
215 if ((selection & RSA_POSSIBLE_SELECTIONS) == 0)
222 if ((selection & OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS) != 0)
225 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
227 selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0;
313 static const OSSL_PARAM *rsa_imexport_types(int selection)
315 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0)
320 static const OSSL_PARAM *rsa_import_types(int selection)
322 return rsa_imexport_types(selection);
325 static const OSSL_PARAM *rsa_export_types(int selection)
327 return rsa_imexport_types(selection);
392 static int rsa_validate(const void *keydata, int selection, int checktype)
400 if ((selection & RSA_POSSIBLE_SELECTIONS) == 0)
404 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR)
408 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
410 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0)
450 static void *gen_init(void *provctx, int selection, int rsa_type,
459 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
486 static void *rsa_gen_init(void *provctx, int selection,
489 return gen_init(provctx, selection, RSA_FLAG_TYPE_RSA, params);
492 static void *rsapss_gen_init(void *provctx, int selection,
495 return gen_init(provctx, selection, RSA_FLAG_TYPE_RSASSAPSS, params);
682 static void *rsa_dup(const void *keydata_from, int selection)
686 && (selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0)
687 return ossl_rsa_dup(keydata_from, selection);