/freebsd/crypto/openssl/crypto/evp/ |
H A D | keymgmt_lib.c | 34 /* Just in time creation of keydata */ in evp_keymgmt_util_try_import() 35 if (data->keydata == NULL) { in evp_keymgmt_util_try_import() 36 if ((data->keydata = evp_keymgmt_newdata(data->keymgmt)) == NULL) { in evp_keymgmt_util_try_import() 50 if (evp_keymgmt_import(data->keymgmt, data->keydata, data->selection, in evp_keymgmt_util_try_import() 54 evp_keymgmt_freedata(data->keymgmt, data->keydata); in evp_keymgmt_util_try_import() 55 data->keydata = NULL; in evp_keymgmt_util_try_import() 61 void *keydata) in evp_keymgmt_util_assign_pkey() argument 63 if (pkey == NULL || keymgmt == NULL || keydata == NULL in evp_keymgmt_util_assign_pkey() 68 pkey->keydata = keydata; in evp_keymgmt_util_assign_pkey() 73 evp_keymgmt_util_make_pkey(EVP_KEYMGMT * keymgmt,void * keydata) evp_keymgmt_util_make_pkey() argument 256 evp_keymgmt_util_cache_keydata(EVP_PKEY * pk,EVP_KEYMGMT * keymgmt,void * keydata,int selection) evp_keymgmt_util_cache_keydata() argument 317 void *keydata = NULL; evp_keymgmt_util_fromdata() local 515 void *keydata = NULL; evp_keymgmt_util_gen() local 533 evp_keymgmt_util_get_deflt_digest_name(EVP_KEYMGMT * keymgmt,void * keydata,char * mdname,size_t mdname_sz) evp_keymgmt_util_get_deflt_digest_name() argument [all...] |
H A D | keymgmt_meth.c | 324 void evp_keymgmt_freedata(const EVP_KEYMGMT *keymgmt, void *keydata) in evp_keymgmt_freedata() argument 327 keymgmt->free(keydata); in evp_keymgmt_freedata() 398 int evp_keymgmt_get_params(const EVP_KEYMGMT *keymgmt, void *keydata, in evp_keymgmt_get_params() argument 403 return keymgmt->get_params(keydata, params); in evp_keymgmt_get_params() 415 int evp_keymgmt_set_params(const EVP_KEYMGMT *keymgmt, void *keydata, in evp_keymgmt_set_params() argument 420 return keymgmt->set_params(keydata, params); in evp_keymgmt_set_params() 432 int evp_keymgmt_has(const EVP_KEYMGMT *keymgmt, void *keydata, int selection) in evp_keymgmt_has() argument 435 return keymgmt->has(keydata, selection); in evp_keymgmt_has() 438 int evp_keymgmt_validate(const EVP_KEYMGMT *keymgmt, void *keydata, in evp_keymgmt_validate() argument 444 return keymgmt->validate(keydata, selection, checktype); in evp_keymgmt_validate() [all …]
|
H A D | p_lib.c | 187 * to copy the appropriate data to |to|'s keydata. in EVP_PKEY_copy_parameters() 188 * We cannot override existing data so do it only if there is no keydata in EVP_PKEY_copy_parameters() 191 if (to->keymgmt != NULL && to->keydata == NULL) { in EVP_PKEY_copy_parameters() 204 ok = (to->keydata = evp_keymgmt_dup(to->keymgmt, in EVP_PKEY_copy_parameters() 261 * step is to do a bit of cross export to ensure we have keydata for in evp_pkey_cmp_any() 265 keydata1 = a->keydata; in evp_pkey_cmp_any() 267 keydata2 = b->keydata; in evp_pkey_cmp_any() 1340 pkey->keydata, in EVP_PKEY_get_default_digest_name() 1516 free_it = free_it || pkey->keydata != NULL; in pkey_set_type() 1771 evp_keymgmt_freedata(x->keymgmt, x->keydata); in evp_pkey_free_it() 1837 void *keydata = NULL; evp_pkey_export_to_provider() local 2011 void *keydata = src->keydata; evp_pkey_copy_downgraded() local [all...] |
H A D | pmeth_check.c | 31 void *keydata; in try_provided_check() local 37 keydata = evp_pkey_export_to_provider(ctx->pkey, ctx->libctx, in try_provided_check() 39 if (keydata == NULL) { in try_provided_check() 44 return evp_keymgmt_validate(keymgmt, keydata, selection, checktype); in try_provided_check()
|
/freebsd/crypto/heimdal/lib/krb5/ |
H A D | crypto-pk.c | 50 void *keydata; in _krb5_pk_octetstring2key() local 63 keydata = malloc(keylen); in _krb5_pk_octetstring2key() 64 if (keydata == NULL) { in _krb5_pk_octetstring2key() 71 free(keydata); in _krb5_pk_octetstring2key() 91 memcpy((unsigned char *)keydata + offset, in _krb5_pk_octetstring2key() 102 ret = krb5_random_to_key(context, type, keydata, keylen, key); in _krb5_pk_octetstring2key() 103 memset(keydata, 0, sizeof(keylen)); in _krb5_pk_octetstring2key() 104 free(keydata); in _krb5_pk_octetstring2key() 215 unsigned char *keydata; in _krb5_pk_kdf() local 250 keydata = malloc(keylen); in _krb5_pk_kdf() [all …]
|
/freebsd/crypto/openssl/test/ |
H A D | keymgmt_internal_test.c | 103 unsigned long *keydata = arg; in export_cb() local 106 if (keydata == NULL) in export_cb() 110 || !TEST_true(get_ulong_via_BN(p, &keydata[N])) in export_cb() 112 || !TEST_true(get_ulong_via_BN(p, &keydata[E])) in export_cb() 114 || !TEST_true(get_ulong_via_BN(p, &keydata[D]))) in export_cb() 118 || !TEST_true(get_ulong_via_BN(p, &keydata[P])) in export_cb() 120 || !TEST_true(get_ulong_via_BN(p, &keydata[Q])) in export_cb() 122 || !TEST_true(get_ulong_via_BN(p, &keydata[F3]))) in export_cb() 126 || !TEST_true(get_ulong_via_BN(p, &keydata[DP])) in export_cb() 128 || !TEST_true(get_ulong_via_BN(p, &keydata[D in export_cb() 175 static unsigned long keydata[OSSL_NELEM(expected)] = { 0, }; test_pass_rsa() local 301 void *keydata = NULL; test_evp_pkey_export_to_provider() local [all...] |
H A D | fake_rsaprov.c | 55 static void fake_rsa_keymgmt_free(void *keydata) in fake_rsa_keymgmt_free() argument 57 OPENSSL_free(keydata); in fake_rsa_keymgmt_free() 77 static int fake_rsa_keymgmt_import(void *keydata, int selection, in fake_rsa_keymgmt_import() argument 80 struct fake_rsa_keydata *fake_rsa_key = keydata; in fake_rsa_keymgmt_import() 161 static int fake_rsa_keymgmt_export(void *keydata, int selection, in fake_rsa_keymgmt_export() argument 246 struct fake_rsa_keydata *keydata; in fake_rsa_gen() local 252 if (!TEST_ptr(keydata = fake_rsa_keymgmt_new(NULL))) in fake_rsa_gen() 255 keydata->status = 2; in fake_rsa_gen() 256 return keydata; in fake_rsa_gen() 311 struct fake_rsa_keydata *keydata = provkey; in fake_rsa_sig_sign_init() local [all …]
|
H A D | evp_extra_test2.c | 248 static APK_DATA keydata[] = { variable 451 const APK_DATA *ak = &keydata[i]; in test_d2i_AutoPrivateKey_ex() 618 if (!TEST_ptr(key_bio = BIO_new_mem_buf(keydata[id].kder, keydata[id].size))) in test_d2i_PrivateKey_ex() 645 if (!TEST_ptr(key_bio = BIO_new_mem_buf(keydata[testid].kder, keydata[testid].size))) in test_PEM_read_bio_negative() 1073 const unsigned char *pdata = keydata[0].kder; in test_pkey_todata_null() 1075 ret = TEST_ptr(pkey = d2i_AutoPrivateKey_ex(NULL, &pdata, keydata[0].size, in test_pkey_todata_null() 1096 const unsigned char *pdata = keydata[0].kder; in test_pkey_export_null() 1098 ret = TEST_ptr(pkey = d2i_AutoPrivateKey_ex(NULL, &pdata, keydata[0].size, in test_pkey_export_null() 1114 const unsigned char *pdata = keydata[0].kder; in test_pkey_export() 1115 int pdata_len = keydata[0].size; in test_pkey_export() [all …]
|
/freebsd/crypto/openssl/crypto/encode_decode/ |
H A D | decoder_pkey.c | 136 void *keydata = NULL; in decoder_construct_pkey() local 147 keydata = evp_keymgmt_load(keymgmt, object_ref, object_ref_sz); in decoder_construct_pkey() 152 import_data.keydata = NULL; in decoder_construct_pkey() 167 keydata = import_data.keydata; in decoder_construct_pkey() 168 import_data.keydata = NULL; in decoder_construct_pkey() 171 if (keydata != NULL in decoder_construct_pkey() 172 && (pkey = evp_keymgmt_util_make_pkey(keymgmt, keydata)) == NULL) in decoder_construct_pkey() 173 evp_keymgmt_freedata(keymgmt, keydata); in decoder_construct_pkey()
|
/freebsd/crypto/openssl/providers/implementations/keymgmt/ |
H A D | ecx_kmgmt.c | 122 static int ecx_has(const void *keydata, int selection) in ecx_has() argument 124 const ECX_KEY *key = keydata; in ecx_has() 191 static int ecx_import(void *keydata, int selection, const OSSL_PARAM params[]) in ecx_import() argument 193 ECX_KEY *key = keydata; in ecx_import() 230 static int ecx_export(void *keydata, int selection, OSSL_CALLBACK *param_cb, in ecx_export() argument 233 ECX_KEY *key = keydata; in ecx_export() 749 static int ecx_validate(const void *keydata, int selection, int type, size_t keylen) in ecx_validate() argument 751 const ECX_KEY *ecx = keydata; in ecx_validate() 777 static int x25519_validate(const void *keydata, int selection, int checktype) in x25519_validate() argument 779 return ecx_validate(keydata, selection, ECX_KEY_TYPE_X25519, X25519_KEYLEN); in x25519_validate() [all …]
|
H A D | dsa_kmgmt.c | 125 static void dsa_freedata(void *keydata) in dsa_freedata() argument 127 DSA_free(keydata); in dsa_freedata() 130 static int dsa_has(const void *keydata, int selection) in dsa_has() argument 132 const DSA *dsa = keydata; in dsa_has() 191 static int dsa_import(void *keydata, int selection, const OSSL_PARAM params[]) in dsa_import() argument 193 DSA *dsa = keydata; in dsa_import() 215 static int dsa_export(void *keydata, int selection, OSSL_CALLBACK *param_cb, in dsa_export() argument 218 DSA *dsa = keydata; in dsa_export() 378 static int dsa_validate(const void *keydata, int selection, int checktype) in dsa_validate() argument 380 const DSA *dsa = keydata; in dsa_validate()
|
H A D | rsa_kmgmt.c | 110 static void rsa_freedata(void *keydata) in rsa_freedata() argument 112 RSA_free(keydata); in rsa_freedata() 115 static int rsa_has(const void *keydata, int selection) in rsa_has() argument 117 const RSA *rsa = keydata; in rsa_has() 173 static int rsa_import(void *keydata, int selection, const OSSL_PARAM params[]) in rsa_import() argument 175 RSA *rsa = keydata; in rsa_import() 203 static int rsa_export(void *keydata, int selection, in rsa_export() argument 206 RSA *rsa = keydata; in rsa_export() 392 static int rsa_validate(const void *keydata, int selection, int checktype) in rsa_validate() argument 394 const RSA *rsa = keydata; in rsa_validate()
|
H A D | mac_legacy_kmgmt.c | 138 static int mac_has(const void *keydata, int selection) in mac_has() argument 140 const MAC_KEY *key = keydata; in mac_has() 231 static int mac_import(void *keydata, int selection, const OSSL_PARAM params[]) in mac_import() argument 233 MAC_KEY *key = keydata; in mac_import() 273 static int mac_export(void *keydata, int selection, OSSL_CALLBACK *param_cb, in mac_export() argument 276 MAC_KEY *key = keydata; in mac_export() 357 static int mac_set_params(void *keydata, const OSSL_PARAM params[]) in mac_set_params() argument 359 MAC_KEY *key = keydata; in mac_set_params()
|
H A D | ec_kmgmt.c | 298 void ec_freedata(void *keydata) in ec_freedata() argument 300 EC_KEY_free(keydata); in ec_freedata() 304 int ec_has(const void *keydata, int selection) in ec_has() argument 306 const EC_KEY *ec = keydata; in ec_has() 390 int common_import(void *keydata, int selection, const OSSL_PARAM params[], in common_import() argument 393 EC_KEY *ec = keydata; in common_import() 433 int ec_import(void *keydata, int selection, const OSSL_PARAM params[]) in ec_import() argument 435 return common_import(keydata, selection, params, 0); in ec_import() 441 int sm2_import(void *keydata, int selection, const OSSL_PARAM params[]) in sm2_import() argument 443 return common_import(keydata, selection, params, 1); in sm2_import() [all …]
|
/freebsd/sys/kgssapi/krb5/ |
H A D | kcrypto.h | 100 krb5_set_key(struct krb5_key_state *ks, const void *keydata) in krb5_set_key() argument 103 ks->ks_class->ec_set_key(ks, keydata); in krb5_set_key() 107 krb5_random_to_key(struct krb5_key_state *ks, const void *keydata) in krb5_random_to_key() argument 110 ks->ks_class->ec_random_to_key(ks, keydata); in krb5_random_to_key()
|
/freebsd/crypto/openssl/include/crypto/ |
H A D | evp.h | 591 void *keydata; member 628 ((pk)->pkey.ptr != NULL || (pk)->keydata != NULL) 631 ((pk)->keydata != NULL) 692 void *keydata; member 771 void *keydata; member 777 void *keydata); 778 EVP_PKEY *evp_keymgmt_util_make_pkey(EVP_KEYMGMT *keymgmt, void *keydata); 789 void *keydata, int selection); 799 void *keydata, 810 void *keydata, OSSL_PARAM params[]); [all …]
|
/freebsd/crypto/openssl/crypto/store/ |
H A D | store_result.c | 193 void *keydata = NULL; in try_key_ref() local 202 while (keymgmt != NULL && keydata == NULL && try_fallback-- > 0) { in try_key_ref() 214 keydata = evp_keymgmt_load(keymgmt, data->ref, data->ref_size); in try_key_ref() 221 import_data.keydata = NULL; in try_key_ref() 235 keydata = import_data.keydata; in try_key_ref() 238 if (keydata == NULL && try_fallback > 0) { in try_key_ref() 248 if (keydata != NULL) { in try_key_ref() 250 pk = evp_keymgmt_util_make_pkey(keymgmt, keydata); in try_key_ref()
|
/freebsd/crypto/openssl/providers/implementations/encode_decode/ |
H A D | decode_pvk2key.c | 190 void *keydata; in pvk2key_export_object() local 192 if (reference_sz == sizeof(keydata) && export != NULL) { in pvk2key_export_object() 198 keydata = *(void **)reference; in pvk2key_export_object() 200 return export(keydata, selection, export_cb, export_cbarg); in pvk2key_export_object()
|
H A D | decode_msblob2key.c | 223 void *keydata; in msblob2key_export_object() local 225 if (reference_sz == sizeof(keydata) && export != NULL) { in msblob2key_export_object() 231 keydata = *(void **)reference; in msblob2key_export_object() 233 return export(keydata, selection, export_cb, export_cbarg); in msblob2key_export_object()
|
/freebsd/crypto/openssl/doc/man7/ |
H A D | provider-keymgmt.pod | 17 /* Key object (keydata) creation and destruction */ 19 void OSSL_FUNC_keymgmt_free(void *keydata); 35 int OSSL_FUNC_keymgmt_get_params(void *keydata, OSSL_PARAM params[]); 37 int OSSL_FUNC_keymgmt_set_params(void *keydata, const OSSL_PARAM params[]); 41 int OSSL_FUNC_keymgmt_has(const void *keydata, int selection); 49 int OSSL_FUNC_keymgmt_import(void *keydata, int selection, const OSSL_PARAM params[]); 51 int OSSL_FUNC_keymgmt_export(void *keydata, int selection, 59 int OSSL_FUNC_keymgmt_validate(const void *keydata, int selection, int checktype); 126 represented as I<keydata> in this manual. 215 OSSL_FUNC_keymgmt_free() should free the passed I<keydata>. [all …]
|
/freebsd/crypto/openssl/doc/internal/man3/ |
H A D | evp_keymgmt_newdata.pod | 19 void *keydata, OSSL_PARAM params[]); 22 int evp_keymgmt_validate(const EVP_KEYMGMT *keymgmt, void *keydata, 25 int evp_keymgmt_import(const EVP_KEYMGMT *keymgmt, void *keydata, 29 int evp_keymgmt_export(const EVP_KEYMGMT *keymgmt, void *keydata,
|
/freebsd/contrib/ldns/ |
H A D | rr_functions.c | 268 ldns_rr_dnskey_key_size_raw(const unsigned char* keydata, in ldns_rr_dnskey_key_size_raw() argument 286 t = keydata[0]; in ldns_rr_dnskey_key_size_raw() 301 if (keydata[0] == 0) { in ldns_rr_dnskey_key_size_raw() 304 memmove(&int16, keydata + 1, 2); in ldns_rr_dnskey_key_size_raw() 311 exp = keydata[0]; in ldns_rr_dnskey_key_size_raw()
|
/freebsd/lib/libc/db/test/btree.tests/ |
H A D | main.c | 69 void keydata(DBT *, DBT *); 318 keydata(&key, &data); 389 keydata(&key, &data); 418 keydata(&key, &data); 572 keydata(&key, &data); 673 keydata(&key, &data); 696 keydata(&key, &data); 742 keydata(key, data) in keydata() function
|
/freebsd/usr.sbin/sa/ |
H A D | pdb.c | 113 char keydata[sizeof ci->ci_comm]; in pacct_add() local 116 bcopy(ci->ci_comm, &keydata, sizeof keydata); in pacct_add() 117 key.data = &keydata; in pacct_add() 118 key.size = strlen(keydata); in pacct_add()
|
/freebsd/crypto/heimdal/lib/hx509/ |
H A D | ks_file.c | 147 heim_octet_string keydata; in parse_pkcs8_private_key() local 155 keydata.data = rk_UNCONST(data); in parse_pkcs8_private_key() 156 keydata.length = length; in parse_pkcs8_private_key() 163 &keydata); in parse_pkcs8_private_key() 302 heim_octet_string keydata; in parse_pem_private_key() local 304 keydata.data = rk_UNCONST(data); in parse_pem_private_key() 305 keydata.length = len; in parse_pem_private_key() 308 &keydata, NULL); in parse_pem_private_key()
|