/openssl/providers/implementations/keymgmt/ |
H A D | dsa_kmgmt.c | 59 int selection; member 133 static int dsa_has(const void *keydata, int selection) in dsa_has() argument 140 if ((selection & DSA_POSSIBLE_SELECTIONS) == 0) in dsa_has() 202 if ((selection & DSA_POSSIBLE_SELECTIONS) == 0) in dsa_import() 229 if ((selection & DSA_POSSIBLE_SELECTIONS) == 0) in dsa_export() 307 return dsa_imexport_types(selection); in dsa_import_types() 312 return dsa_imexport_types(selection); in dsa_export_types() 389 if ((selection & DSA_POSSIBLE_SELECTIONS) == 0) in dsa_validate() 402 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) in dsa_validate() 418 gctx->selection = selection; in dsa_gen_init() [all …]
|
H A D | rsa_kmgmt.c | 115 static int rsa_has(const void *keydata, int selection) in rsa_has() argument 122 if ((selection & RSA_POSSIBLE_SELECTIONS) == 0) in rsa_has() 126 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) in rsa_has() 183 if ((selection & RSA_POSSIBLE_SELECTIONS) == 0) in rsa_import() 203 static int rsa_export(void *keydata, int selection, in rsa_export() argument 215 if ((selection & RSA_POSSIBLE_SELECTIONS) == 0) in rsa_export() 322 return rsa_imexport_types(selection); in rsa_import_types() 327 return rsa_imexport_types(selection); in rsa_export_types() 400 if ((selection & RSA_POSSIBLE_SELECTIONS) == 0) in rsa_validate() 404 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) in rsa_validate() [all …]
|
H A D | template_kmgmt.c | 68 int selection; member 96 static int template_has(const void *keydata, int selection) in template_has() argument 119 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in template_match() 122 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) { in template_match() 157 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0) in template_export() 164 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in template_export() 224 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0) in template_import() 246 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) in template_imexport_types() 333 static void *template_gen_init(void *provctx, int selection, in template_gen_init() argument 347 gctx->selection = selection; in template_gen_init() [all …]
|
H A D | dh_kmgmt.c | 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() 199 if ((selection & DH_POSSIBLE_SELECTIONS) == 0) in dh_import() 226 if ((selection & DH_POSSIBLE_SELECTIONS) == 0) in dh_export() 307 return dh_imexport_types(selection); in dh_import_types() 312 return dh_imexport_types(selection); in dh_export_types() 420 if ((selection & DH_POSSIBLE_SELECTIONS) == 0) in dh_validate() 441 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) in dh_validate() 456 if ((selection & (OSSL_KEYMGMT_SELECT_KEYPAIR in dh_gen_init_base() [all …]
|
H A D | ec_kmgmt.c | 307 int ec_has(const void *keydata, int selection) in ec_has() argument 314 if ((selection & EC_POSSIBLE_SELECTIONS) == 0) in ec_has() 560 const OSSL_PARAM *ec_imexport_types(int selection) in ec_imexport_types() argument 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() 908 if ((selection & EC_POSSIBLE_SELECTIONS) == 0) in sm2_validate() 947 if ((selection & EC_POSSIBLE_SELECTIONS) == 0) in ec_validate() 991 int selection; member [all …]
|
H A D | ecx_kmgmt.c | 83 int selection; member 127 static int ecx_has(const void *keydata, int selection) in ecx_has() argument 159 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in ecx_match() 205 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0) in ecx_import() 246 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0) in ecx_export() 253 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in ecx_export() 281 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) in ecx_imexport_types() 489 static void *ecx_gen_init(void *provctx, int selection, in ecx_gen_init() argument 502 gctx->selection = selection; in ecx_gen_init() 525 static void *x448_gen_init(void *provctx, int selection, in x448_gen_init() argument [all …]
|
H A D | mac_legacy_kmgmt.c | 58 int selection; member 136 static int mac_has(const void *keydata, int selection) in mac_has() argument 232 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) == 0) in mac_import() 278 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) == 0) in mac_export() 285 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0 in mac_export() 305 static const OSSL_PARAM *mac_imexport_types(int selection) in mac_imexport_types() argument 307 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in mac_imexport_types() 319 static const OSSL_PARAM *cmac_imexport_types(int selection) in cmac_imexport_types() argument 385 gctx->selection = selection; in mac_gen_init_common() 390 static void *mac_gen_init(void *provctx, int selection, in mac_gen_init() argument [all …]
|
/openssl/crypto/evp/ |
H A D | keymgmt_lib.c | 87 int evp_keymgmt_util_export(const EVP_PKEY *pk, int selection, in evp_keymgmt_util_export() argument 92 return evp_keymgmt_export(pk->keymgmt, pk->keydata, selection, in evp_keymgmt_util_export() 97 int selection) in evp_keymgmt_util_export_to_provider() argument 161 import_data.selection = selection; in evp_keymgmt_util_export_to_provider() 167 if (!evp_keymgmt_util_export(pk, selection, in evp_keymgmt_util_export_to_provider() 201 selection)) { in evp_keymgmt_util_export_to_provider() 247 if ((p->selection & selection) == selection in evp_keymgmt_util_find_operation_cache() 273 p->selection = selection; in evp_keymgmt_util_cache_keydata() 329 int evp_keymgmt_util_has(EVP_PKEY *pk, int selection) in evp_keymgmt_util_has() argument 475 import_data.selection = selection; in evp_keymgmt_util_copy() [all …]
|
H A D | keymgmt_meth.c | 390 return keymgmt->gen_init(provctx, selection, params); in evp_keymgmt_gen_init() 505 return keymgmt->has(keydata, selection); in evp_keymgmt_has() 509 int selection, int checktype) in evp_keymgmt_validate() argument 519 int selection) in evp_keymgmt_match() argument 524 return keymgmt->match(keydata1, keydata2, selection); in evp_keymgmt_match() 532 return keymgmt->import(keydata, selection, params); in evp_keymgmt_import() 536 int selection) in evp_keymgmt_import_types() argument 544 return keymgmt->import_types(selection); in evp_keymgmt_import_types() 564 return keymgmt->export_types(selection); in evp_keymgmt_export_types() 568 int selection) in evp_keymgmt_dup() argument [all …]
|
/openssl/providers/implementations/encode_decode/ |
H A D | decode_msblob2key.c | 60 int selection; member 84 if (selection == 0) in msblob2key_does_selection() 87 if ((selection & (OSSL_KEYMGMT_SELECT_PRIVATE_KEY in msblob2key_does_selection() 122 ctx->selection = selection; in msblob2key_decode() 143 if ((selection == 0 in msblob2key_decode() 154 if (selection != 0 && key == NULL) in msblob2key_decode() 157 if (key == NULL && (selection == 0 in msblob2key_decode() 163 if (selection != 0 && key == NULL) in msblob2key_decode() 224 int selection = ctx->selection; in msblob2key_export_object() local 226 if (selection == 0) in msblob2key_export_object() [all …]
|
H A D | decode_pvk2key.c | 64 int selection; member 108 static int pvk2key_does_selection(void *provctx, int selection) in pvk2key_does_selection() argument 110 if (selection == 0) in pvk2key_does_selection() 113 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in pvk2key_does_selection() 131 ctx->selection = selection; in pvk2key_decode() 133 if ((selection == 0 in pvk2key_decode() 134 || (selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in pvk2key_decode() 163 if (selection != 0 && key == NULL) in pvk2key_decode() 220 int selection = ctx->selection; in pvk2key_export_object() local 222 if (selection == 0) in pvk2key_export_object() [all …]
|
H A D | encode_key2text.c | 231 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in dh_to_text() 238 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) { in dh_to_text() 245 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in dh_to_text() 306 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in dsa_to_text() 313 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) { in dsa_to_text() 320 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in dsa_to_text() 511 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in ec_to_text() 519 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) { in ec_to_text() 530 if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) { in ec_to_text() 800 int selection), in key2text_encode() argument [all …]
|
H A D | encode_key2blob.c | 55 static int key2blob_check_selection(int selection, int selection_mask) in key2blob_check_selection() argument 69 if (selection == 0) in key2blob_check_selection() 73 int check1 = (selection & checks[i]) != 0; in key2blob_check_selection() 88 static int key2blob_encode(void *vctx, const void *key, int selection, in key2blob_encode() argument 129 static void *impl##2blob_import_object(void *ctx, int selection, \ 133 ctx, selection, params); \ 139 static int impl##2blob_does_selection(void *ctx, int selection) \ 141 return key2blob_check_selection(selection, \ 147 int selection, \ 156 return key2blob_encode(vctx, key, selection, cout); \
|
H A D | encode_key2ms.c | 112 static int key2ms_does_selection(void *vctx, int selection) in key2ms_does_selection() argument 114 return (selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0; in key2ms_does_selection() 128 static int key2msblob_encode(void *vctx, const void *key, int selection, in key2msblob_encode() argument 137 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in key2msblob_encode() 139 else if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) in key2msblob_encode() 150 static int key2pvk_encode(void *vctx, const void *key, int selection, in key2pvk_encode() argument 158 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) == 0) in key2pvk_encode() 186 impl##2##output##_import_object(void *ctx, int selection, \ 190 ctx, selection, params); \ 199 int selection, \ [all …]
|
H A D | decode_der2key.c | 96 int selection; member 172 static int der2key_check_selection(int selection, in der2key_check_selection() argument 187 if (selection == 0) in der2key_check_selection() 217 ctx->selection = selection; in der2key_decode() 226 if (selection == 0) in der2key_decode() 227 selection = ctx->desc->selection_mask; in der2key_decode() 251 if (key == NULL && ctx->selection != 0) { in der2key_decode() 262 if (key == NULL && ctx->selection != 0) { in der2key_decode() 358 int selection = ctx->selection; in der2key_export_object() local 360 if (selection == 0) in der2key_export_object() [all …]
|
/openssl/crypto/encode_decode/ |
H A D | encoder_pkey.c | 159 int selection; member 192 int selection = data->selection; in encoder_construct_pkey() local 194 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in encoder_construct_pkey() 195 selection |= OSSL_KEYMGMT_SELECT_PUBLIC_KEY; in encoder_construct_pkey() 198 if (!evp_keymgmt_export(pk->keymgmt, pk->keydata, selection, in encoder_construct_pkey() 231 int selection, in ossl_encoder_ctx_setup_for_pkey() argument 330 data->selection = selection; in ossl_encoder_ctx_setup_for_pkey() 345 int selection, in OSSL_ENCODER_CTX_new_for_pkey() argument 378 (void *)ctx, EVP_PKEY_get0_type_name(pkey), selection); in OSSL_ENCODER_CTX_new_for_pkey() 386 && OSSL_ENCODER_CTX_set_selection(ctx, selection) in OSSL_ENCODER_CTX_new_for_pkey() [all …]
|
H A D | decoder_pkey.c | 63 int selection; member 161 import_data.selection = data->selection; in decoder_construct_pkey() 419 process_data->selection = ctx->selection; in ossl_decoder_ctx_setup_for_pkey() 516 dest->selection = src->selection; in ossl_decoder_ctx_for_pkey_dup() 563 process_data_dest->selection = process_data_src->selection; in ossl_decoder_ctx_for_pkey_dup() 592 int selection; member 633 hash ^= cache->selection; in decoder_cache_entry_hash() 662 if (a->selection != b->selection) in decoder_cache_entry_cmp() 663 return (a->selection < b->selection) ? -1 : 1; in decoder_cache_entry_cmp() 768 cacheent.selection = selection; in OSSL_DECODER_CTX_new_for_pkey() [all …]
|
/openssl/test/ |
H A D | endecoder_legacy_test.c | 437 EVP_PKEY *provided_pkey, int selection, in test_DER() argument 530 int selection = OSSL_KEYMGMT_SELECT_ALL; in test_key() local 548 int selection = in test_key() local 587 int selection = in test_key() local 605 int selection = OSSL_KEYMGMT_SELECT_ALL; in test_key() local 616 pkey, selection, structure)) in test_key() 623 int selection = in test_key() local 636 pkey, selection, structure)) in test_key() 653 pkey, selection, structure)) in test_key() 660 int selection = in test_key() local [all …]
|
H A D | fake_rsaprov.c | 36 int selection; member 66 static int fake_rsa_keymgmt_has(const void *key, int selection) in fake_rsa_keymgmt_has() argument 69 has_selection = selection; in fake_rsa_keymgmt_has() 83 static int fake_rsa_keymgmt_import(void *keydata, int selection, in fake_rsa_keymgmt_import() argument 167 static int fake_rsa_keymgmt_export(void *keydata, int selection, in fake_rsa_keymgmt_export() argument 173 if (selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) in fake_rsa_keymgmt_export() 196 static const OSSL_PARAM *fake_rsa_keymgmt_imptypes(int selection) in fake_rsa_keymgmt_imptypes() argument 199 imptypes_selection = selection; in fake_rsa_keymgmt_imptypes() 210 static const OSSL_PARAM *fake_rsa_keymgmt_exptypes(int selection) in fake_rsa_keymgmt_exptypes() argument 213 exptypes_selection = selection; in fake_rsa_keymgmt_exptypes() [all …]
|
/openssl/crypto/pem/ |
H A D | pem_pkey.c | 37 int selection) in pem_read_bio_key_decoder() argument 48 selection, libctx, propq); in pem_read_bio_key_decoder() 79 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) in pem_read_bio_key_decoder() 80 selection = selection & ~OSSL_KEYMGMT_SELECT_PUBLIC_KEY; in pem_read_bio_key_decoder() 82 if (!evp_keymgmt_util_has(pkey, selection)) { in pem_read_bio_key_decoder() 103 int selection) in pem_read_bio_key_legacy() argument 113 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) { in pem_read_bio_key_legacy() 123 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) in pem_read_bio_key_legacy() 185 } else if ((selection & EVP_PKEY_KEYPAIR) == 0 in pem_read_bio_key_legacy() 218 int selection) in pem_read_bio_key() argument [all …]
|
/openssl/demos/encode/ |
H A D | ec_encode.c | 34 int selection = 0; in load_key() local 47 selection, in load_key() 104 int selection; in store_key() local 121 selection = (passphrase != NULL) in store_key() 125 ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, "PEM", NULL, propq); in store_key()
|
H A D | rsa_encode.c | 34 int selection = 0; in load_key() local 47 selection, in load_key() 104 int selection; in store_key() local 121 selection = (passphrase != NULL) in store_key() 125 ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, "PEM", NULL, propq); in store_key()
|
/openssl/crypto/dsa/ |
H A D | dsa_backend.c | 82 DSA *ossl_dsa_dup(const DSA *dsa, int selection) in ossl_dsa_dup() argument 93 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0 in ossl_dsa_dup() 99 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0 in ossl_dsa_dup() 100 && ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) == 0 in ossl_dsa_dup() 104 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0 in ossl_dsa_dup() 105 && ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) == 0 in ossl_dsa_dup()
|
/openssl/doc/internal/man3/ |
H A D | evp_keymgmt_util_export_to_provider.pod | 21 int evp_keymgmt_util_export(const EVP_PKEY *pk, int selection, 24 int selection); 27 int selection); 30 void *keydata, int selection); 33 int selection, const OSSL_PARAM params[]); 69 In all functions that take a I<selection> argument, the selection is used to 72 the selection.
|
/openssl/crypto/dh/ |
H A D | dh_backend.c | 139 DH *ossl_dh_dup(const DH *dh, int selection) in ossl_dh_dup() argument 151 if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0 in ossl_dh_dup() 157 if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0 in ossl_dh_dup() 158 && ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) == 0 in ossl_dh_dup() 162 if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0 in ossl_dh_dup() 163 && ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) == 0 in ossl_dh_dup()
|