Home
last modified time | relevance | path

Searched refs:key_id (Results 1 – 25 of 93) sorted by relevance

1234

/third_party/mbedtls/tests/suites/
Dtest_suite_psa_crypto_persistent_key.function119 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 1, 42 );
128 psa_set_key_id( &attributes, key_id );
131 TEST_EQUAL( psa_import_key( &attributes, data, data_length, &key_id ),
135 PSA_ASSERT( psa_destroy_key( key_id ) );
140 psa_destroy_persistent_key( key_id );
149 mbedtls_svc_key_id_t key_id =
158 psa_set_key_id( &attributes, key_id );
166 psa_close_key( key_id );
170 TEST_EQUAL( psa_is_key_present_in_storage( key_id ), 1 );
173 PSA_ASSERT( psa_destroy_key( key_id ) );
[all …]
Dtest_suite_psa_crypto_not_supported.function19 mbedtls_svc_key_id_t key_id = INVALID_KEY_ID;
25 &key_id ),
27 TEST_ASSERT( mbedtls_svc_key_id_equal( key_id, MBEDTLS_SVC_KEY_ID_INIT ) );
30 psa_destroy_key( key_id );
39 mbedtls_svc_key_id_t key_id = INVALID_KEY_ID;
44 TEST_EQUAL( psa_generate_key( &attributes, &key_id ),
46 TEST_ASSERT( mbedtls_svc_key_id_equal( key_id, MBEDTLS_SVC_KEY_ID_INIT ) );
49 psa_destroy_key( key_id );
Dtest_suite_psa_crypto_storage_format.function76 mbedtls_svc_key_id_t key_id = psa_get_key_id( expected_attributes );
86 PSA_ASSERT( psa_get_key_attributes( key_id, &actual_attributes ) );
87 TEST_ASSERT( mbedtls_svc_key_id_equal( key_id,
104 PSA_ASSERT( psa_export_key( key_id,
114 key_id,
124 TEST_EQUAL( PSA_ERROR_NOT_PERMITTED, psa_destroy_key( key_id ) );
129 PSA_ASSERT( psa_destroy_key( key_id ) );
166 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 0, 1 );
171 TEST_USES_KEY_ID( key_id );
174 psa_set_key_id( &attributes, key_id );
[all …]
Dtest_suite_psa_crypto_generate_key.function19 mbedtls_svc_key_id_t key_id = INVALID_KEY_ID;
29 TEST_EQUAL( psa_generate_key( &attributes, &key_id ),
36 PSA_ASSERT( psa_get_key_attributes( key_id, &attributes ) );
46 psa_destroy_key( key_id );
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_supplicant_lib/
Dwpa_evp_key.c81 static EVP_PKEY *wrap_rsa(const char *key_id, const RSA *public_rsa) in wrap_rsa() argument
103 if (strlen(key_id) < sizeof(g_key_uri)) in wrap_rsa()
104 os_memcpy(g_key_uri, key_id, strlen(key_id)); in wrap_rsa()
108 static EVP_PKEY* get_pubkey(const char *key_id) in get_pubkey() argument
117 BIO* bio = BIO_from_cm(key_id, certificate); in get_pubkey()
139 EVP_PKEY *GET_EVP_PKEY(const char *key_id) in GET_EVP_PKEY() argument
145 if (key_id == NULL) { in GET_EVP_PKEY()
149 pub_key = get_pubkey(key_id); in GET_EVP_PKEY()
169 wrap_key = wrap_rsa(key_id, public_rsa); in GET_EVP_PKEY()
174 BIO *BIO_from_cm(const char *key_id, struct Credential certificate) in BIO_from_cm() argument
[all …]
Dwpa_evp_key.h20 EVP_PKEY *GET_EVP_PKEY(const char *key_id);
21 BIO *BIO_from_cm(const char *key_id, struct Credential certificate);
/third_party/ltp/testcases/kernel/syscalls/keyctl/
Dkeyctl07.c20 key_serial_t key_id; in try_to_read_negative_key() local
50 &key_id, sizeof(key_id))); in try_to_read_negative_key()
53 if (TST_RET != sizeof(key_id)) { in try_to_read_negative_key()
55 TST_RET, sizeof(key_id)); in try_to_read_negative_key()
63 TEST(keyctl(KEYCTL_READ, key_id, buffer, sizeof(buffer))); in try_to_read_negative_key()
/third_party/mbedtls/tests/include/test/
Dpsa_crypto_helpers.h39 int mbedtls_test_uses_key_id( mbedtls_svc_key_id_t key_id );
78 #define TEST_USES_KEY_ID( key_id ) \ argument
79 TEST_ASSERT( mbedtls_test_uses_key_id( key_id ) )
83 #define TEST_USES_KEY_ID( key_id ) ( (void) ( key_id ) ) argument
/third_party/mbedtls/tests/src/
Dpsa_crypto_helpers.c39 int mbedtls_test_uses_key_id( mbedtls_svc_key_id_t key_id ) in mbedtls_test_uses_key_id() argument
42 if( MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key_id ) > in mbedtls_test_uses_key_id()
50 if( mbedtls_svc_key_id_equal( key_id, key_ids_used_in_test[i] ) ) in mbedtls_test_uses_key_id()
55 key_ids_used_in_test[num_key_ids_used] = key_id; in mbedtls_test_uses_key_id()
/third_party/mbedtls/library/
Dpsa_crypto_slot_management.c56 psa_key_id_t key_id = MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key ); in psa_is_valid_key_id() local
58 if( ( PSA_KEY_ID_USER_MIN <= key_id ) && in psa_is_valid_key_id()
59 ( key_id <= PSA_KEY_ID_USER_MAX ) ) in psa_is_valid_key_id()
63 ( PSA_KEY_ID_VENDOR_MIN <= key_id ) && in psa_is_valid_key_id()
64 ( key_id <= PSA_KEY_ID_VENDOR_MAX ) ) in psa_is_valid_key_id()
105 psa_key_id_t key_id = MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key ); in psa_get_and_lock_key_slot_in_memory() local
109 if( psa_key_id_is_volatile( key_id ) ) in psa_get_and_lock_key_slot_in_memory()
111 slot = &global_data.key_slots[ key_id - PSA_KEY_ID_VOLATILE_MIN ]; in psa_get_and_lock_key_slot_in_memory()
Dpsa_crypto_slot_management.h54 static inline int psa_key_id_is_volatile( psa_key_id_t key_id ) in psa_key_id_is_volatile() argument
56 return( ( key_id >= PSA_KEY_ID_VOLATILE_MIN ) && in psa_key_id_is_volatile()
57 ( key_id <= PSA_KEY_ID_VOLATILE_MAX ) ); in psa_key_id_is_volatile()
Dpkwrite.c201 psa_key_id_t* key_id = (psa_key_id_t*) key->pk_ctx; in mbedtls_pk_write_pubkey() local
207 if ( psa_export_public_key( *key_id, start, buffer_size, &len ) in mbedtls_pk_write_pubkey()
268 psa_key_id_t key_id; in mbedtls_pk_write_pubkey_der() local
272 key_id = *((psa_key_id_t*) key->pk_ctx ); in mbedtls_pk_write_pubkey_der()
273 if( PSA_SUCCESS != psa_get_key_attributes( key_id, &attributes ) ) in mbedtls_pk_write_pubkey_der()
/third_party/openssl/crypto/engine/
Deng_pkey.c56 EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, in ENGINE_load_private_key() argument
77 pkey = e->load_privkey(e, key_id, ui_method, callback_data); in ENGINE_load_private_key()
85 EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, in ENGINE_load_public_key() argument
106 pkey = e->load_pubkey(e, key_id, ui_method, callback_data); in ENGINE_load_public_key()
/third_party/ffmpeg/libavutil/
Dencryption_info.c47 info->key_id = av_mallocz(key_id_size); in av_encryption_info_alloc()
55 if (!info->key_id || !info->iv || (!info->subsamples && subsample_count)) { in av_encryption_info_alloc()
75 memcpy(ret->key_id, info->key_id, info->key_id_size); in av_encryption_info_clone()
83 av_free(info->key_id); in av_encryption_info_free()
112 memcpy(info->key_id, buffer + 24, key_id_size); in av_encryption_info_get_side_data()
149 memcpy(cur_buffer, info->key_id, info->key_id_size); in av_encryption_info_add_side_data()
/third_party/mbedtls/include/psa/
Dcrypto_values.h2211 unsigned int unused, psa_key_id_t key_id ) in mbedtls_svc_key_id_make() argument
2215 return( key_id ); in mbedtls_svc_key_id_make()
2245 #define MBEDTLS_SVC_KEY_ID_GET_KEY_ID( id ) ( ( id ).key_id )
2254 mbedtls_key_owner_id_t owner_id, psa_key_id_t key_id ) in mbedtls_svc_key_id_make() argument
2256 return( (mbedtls_svc_key_id_t){ .MBEDTLS_PRIVATE(key_id) = key_id, in mbedtls_svc_key_id_make()
2270 return( ( id1.MBEDTLS_PRIVATE(key_id) == id2.MBEDTLS_PRIVATE(key_id) ) && in mbedtls_svc_key_id_equal()
2282 return( key.MBEDTLS_PRIVATE(key_id) == 0 ); in mbedtls_svc_key_id_is_null()
Dcrypto_extra.h760 static inline int psa_key_id_is_builtin( psa_key_id_t key_id ) in psa_key_id_is_builtin() argument
762 return( ( key_id >= MBEDTLS_PSA_KEY_ID_BUILTIN_MIN ) && in psa_key_id_is_builtin()
763 ( key_id <= MBEDTLS_PSA_KEY_ID_BUILTIN_MAX ) ); in psa_key_id_is_builtin()
811 mbedtls_svc_key_id_t key_id,
/third_party/openssl/apps/lib/
Dengine.c105 char *make_engine_uri(ENGINE *e, const char *key_id, const char *desc) in make_engine_uri() argument
112 } else if (key_id == NULL) { in make_engine_uri()
120 + strlen(key_id) in make_engine_uri()
129 OPENSSL_strlcat(new_uri, key_id, uri_sz); in make_engine_uri()
/third_party/mbedtls/docs/
Dgetting_started.md79 psa_key_id_t key_id;
98 status = psa_import_key(&attributes, key, key_len, &key_id);
109 psa_destroy_key(key_id);
138 psa_key_id_t key_id;
157 status = psa_import_key(&attributes, key, key_len, &key_id);
164 status = psa_sign_hash(key_id, PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
179 psa_destroy_key(key_id);
216 psa_key_id_t key_id;
235 status = psa_import_key(&attributes, key, key_len, &key_id);
243 status = psa_cipher_encrypt_setup(&operation, key_id, alg);
[all …]
/third_party/mesa3d/src/util/tests/hash_table/
Dclear.c35 static uint32_t key_id(const void *key) in key_id() function
87 assert(key_id(entry->key) < SIZE); in main()
101 assert(key_id(entry->key) < SIZE); in main()
/third_party/openssl/engines/
De_ossltest.c376 static EVP_PKEY *load_key(ENGINE *eng, const char *key_id, int pub, in load_key() argument
382 if (OPENSSL_strncasecmp(key_id, "ot:", 3) != 0) in load_key()
384 key_id += 3; in load_key()
387 pub ? "Public" : "Private", key_id); in load_key()
388 in = BIO_new_file(key_id, "r"); in load_key()
399 static EVP_PKEY *ossltest_load_privkey(ENGINE *eng, const char *key_id, in ossltest_load_privkey() argument
402 return load_key(eng, key_id, 0, ui_method, ui_data); in ossltest_load_privkey()
405 static EVP_PKEY *ossltest_load_pubkey(ENGINE *eng, const char *key_id, in ossltest_load_pubkey() argument
408 return load_key(eng, key_id, 1, ui_method, ui_data); in ossltest_load_pubkey()
/third_party/ffmpeg/libavutil/tests/
Dencryption_info.c40 if (memcmp(a->key_id, b->key_id, a->key_id_size) != 0 || in compare_encryption_info()
81 av_assert0(info->key_id); in run_encryption_info_test()
91 memcpy(info->key_id, test_key_id, sizeof(test_key_id)); in run_encryption_info_test()
/third_party/ffmpeg/libavformat/
Drtmpcrypt.c184 static void rtmpe8_sig(const uint8_t *in, uint8_t *out, int key_id) in rtmpe8_sig() argument
188 av_xtea_le_init(&ctx, rtmpe8_keys[key_id]); in rtmpe8_sig()
192 static void rtmpe9_sig(const uint8_t *in, uint8_t *out, int key_id) in rtmpe9_sig() argument
200 av_blowfish_init(&ctx, rtmpe9_keys[key_id], 24); in rtmpe9_sig()
/third_party/mbedtls/tests/src/drivers/
Dplatform_builtin_keys.c73 mbedtls_svc_key_id_t key_id, in mbedtls_psa_platform_get_builtin_key() argument
77 psa_key_id_t app_key_id = MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key_id ); in mbedtls_psa_platform_get_builtin_key()
/third_party/ltp/testcases/kernel/controllers/memcg/functional/
Dmemcg_process.c36 static int key_id; /* used with opt_shm */ variable
71 key_id = atoi(optarg); in process_options()
217 key = ftok("/dev/null", key_id); in shm()
/third_party/python/Doc/includes/
Ddbpickle.py36 type_tag, key_id = pid
39 cursor.execute("SELECT * FROM memos WHERE key=?", (str(key_id),))

1234