| /optee_os/ta/pkcs11/src/ |
| H A D | handle.c | 22 void handle_db_init(struct handle_db *db) in handle_db_init() argument 24 TEE_MemFill(db, 0, sizeof(*db)); in handle_db_init() 27 void handle_db_destroy(struct handle_db *db) in handle_db_destroy() argument 29 if (db) { in handle_db_destroy() 30 TEE_Free(db->ptrs); in handle_db_destroy() 31 db->ptrs = NULL; in handle_db_destroy() 32 db->max_ptrs = 0; in handle_db_destroy() 36 uint32_t handle_get(struct handle_db *db, void *ptr) in handle_get() argument 42 if (!db || !ptr || ptr == INVALID_HANDLE_PTR) in handle_get() 46 for (n = 1; n < db->max_ptrs; n++) { in handle_get() [all …]
|
| H A D | handle.h | 19 void handle_db_init(struct handle_db *db); 26 void handle_db_destroy(struct handle_db *db); 32 uint32_t handle_get(struct handle_db *db, void *ptr); 38 void *handle_put(struct handle_db *db, uint32_t handle); 45 void *handle_lookup(struct handle_db *db, uint32_t handle); 48 uint32_t handle_lookup_handle(struct handle_db *db, void *ptr); 51 void handle_invalidate(struct handle_db *db, uint32_t handle);
|
| H A D | pkcs11_token.c | 1135 struct token_persistent_main *db = token->db_main; in check_so_pin() local 1138 assert(db->flags & PKCS11_CKFT_TOKEN_INITIALIZED); in check_so_pin() 1141 db->flags & PKCS11_CKFT_PROTECTED_AUTHENTICATION_PATH) in check_so_pin() 1144 if (db->flags & PKCS11_CKFT_SO_PIN_LOCKED) in check_so_pin() 1151 db->flags |= PKCS11_CKFT_SO_PIN_COUNT_LOW; in check_so_pin() 1152 db->so_pin_count++; in check_so_pin() 1154 if (db->so_pin_count == PKCS11_TOKEN_SO_PIN_COUNT_MAX - 1) in check_so_pin() 1155 db->flags |= PKCS11_CKFT_SO_PIN_FINAL_TRY; in check_so_pin() 1156 else if (db->so_pin_count == PKCS11_TOKEN_SO_PIN_COUNT_MAX) in check_so_pin() 1157 db->flags |= PKCS11_CKFT_SO_PIN_LOCKED; in check_so_pin() [all …]
|
| /optee_os/core/kernel/ |
| H A D | handle.c | 18 void handle_db_destroy(struct handle_db *db, void (*ptr_destructor)(void *ptr)) in handle_db_destroy() argument 20 if (db) { in handle_db_destroy() 24 for (n = 0; n < db->max_ptrs; n++) in handle_db_destroy() 25 if (db->ptrs[n]) in handle_db_destroy() 26 ptr_destructor(db->ptrs[n]); in handle_db_destroy() 28 free(db->ptrs); in handle_db_destroy() 29 db->ptrs = NULL; in handle_db_destroy() 30 db->max_ptrs = 0; in handle_db_destroy() 34 bool handle_db_is_empty(struct handle_db *db) in handle_db_is_empty() argument 38 if (db) { in handle_db_is_empty() [all …]
|
| H A D | ldelf_syscalls.c | 201 h = handle_get(&sys_ctx->db, binh); in ldelf_syscall_open_bin() 206 handle_put(&sys_ctx->db, h); in ldelf_syscall_open_bin() 229 binh = handle_put(&sys_ctx->db, handle); in ldelf_syscall_close_bin() 238 if (handle_db_is_empty(&sys_ctx->db)) { in ldelf_syscall_close_bin() 239 handle_db_destroy(&sys_ctx->db, bin_close); in ldelf_syscall_close_bin() 325 binh = handle_lookup(&sys_ctx->db, handle); in ldelf_syscall_map_bin() 485 binh = handle_lookup(&sys_ctx->db, handle); in ldelf_syscall_copy_from_bin() 608 handle_db_destroy(&sys_ctx->db, bin_close); in ldelf_sess_cleanup()
|
| /optee_os/core/tee/ |
| H A D | tadb.c | 59 struct tee_tadb_dir *db; member 67 struct tee_tadb_dir *db; member 143 static TEE_Result maybe_grow_files(struct tee_tadb_dir *db, int idx) in maybe_grow_files() argument 147 if (idx < db->nbits) in maybe_grow_files() 150 p = realloc(db->files, bitstr_size(idx + 1)); in maybe_grow_files() 153 db->files = p; in maybe_grow_files() 155 bit_nclear(db->files, db->nbits, idx); in maybe_grow_files() 156 db->nbits = idx + 1; in maybe_grow_files() 161 static TEE_Result set_file(struct tee_tadb_dir *db, int idx) in set_file() argument 163 TEE_Result res = maybe_grow_files(db, idx); in set_file() [all …]
|
| /optee_os/core/include/kernel/ |
| H A D | handle.h | 25 void handle_db_destroy(struct handle_db *db, void (*ptr_destructor)(void *ptr)); 28 bool handle_db_is_empty(struct handle_db *db); 37 int handle_get(struct handle_db *db, void *ptr); 43 void *handle_put(struct handle_db *db, int handle); 50 void *handle_lookup(struct handle_db *db, int handle);
|
| H A D | ldelf_syscalls.h | 18 struct handle_db db; member
|
| /optee_os/core/drivers/crypto/hisilicon/ |
| H A D | hpre_rsa.c | 384 uint8_t *db) in rsa_oaep_fill_db() argument 394 rsa_data->label.length, db, lhash_len); in rsa_oaep_fill_db() 401 db[lhash_len + ps_len] = 1; in rsa_oaep_fill_db() 402 memcpy(db + lhash_len + ps_len + 1, rsa_data->message.data, in rsa_oaep_fill_db() 409 uint8_t *seed, uint8_t *db, in rsa_oaep_fill_maskdb() argument 425 return xor_process(db, seed_mgf, mask_db, db_len); in rsa_oaep_fill_maskdb() 453 uint8_t db[OAEP_MAX_DB_LEN] = { }; in rsa_oaep_encode() local 460 ret = rsa_oaep_fill_db(rsa_data, db); in rsa_oaep_encode() 468 ret = rsa_oaep_fill_maskdb(rsa_data, seed, db, em + lhash_len + 1); in rsa_oaep_encode() 860 uint8_t *mask_db, uint8_t *seed, uint8_t *db) in rsa_oaep_get_db() argument [all …]
|
| /optee_os/scripts/ |
| H A D | sign_encrypt.py | 35 def value_to_key(db, val): argument 36 for k, v in db.items():
|