| /optee_os/core/tee/ |
| H A D | tee_pobj.c | 16 static bool pobj_need_usage_lock(struct tee_pobj *obj) in pobj_need_usage_lock() argument 19 return obj->flags & (TEE_DATA_FLAG_SHARE_WRITE | in pobj_need_usage_lock() 23 void tee_pobj_lock_usage(struct tee_pobj *obj) in tee_pobj_lock_usage() argument 25 if (pobj_need_usage_lock(obj)) in tee_pobj_lock_usage() 29 void tee_pobj_unlock_usage(struct tee_pobj *obj) in tee_pobj_unlock_usage() argument 31 if (pobj_need_usage_lock(obj)) in tee_pobj_unlock_usage() 82 struct tee_pobj **obj) in tee_pobj_get() argument 87 *obj = NULL; in tee_pobj_get() 96 *obj = o; in tee_pobj_get() 100 if (*obj) { in tee_pobj_get() [all …]
|
| H A D | tee_svc_storage.c | 164 uint32_t *obj) in syscall_storage_obj_open() argument 227 res = copy_kaddr_to_uref(obj, o); in syscall_storage_obj_open() 312 uint32_t *obj) in syscall_storage_obj_create() argument 368 if (!obj && attr_o && in syscall_storage_obj_create() 412 if (obj) { in syscall_storage_obj_create() 413 res = copy_kaddr_to_uref(obj, o); in syscall_storage_obj_create() 420 if (!obj) in syscall_storage_obj_create() 445 TEE_Result syscall_storage_obj_del(unsigned long obj) in syscall_storage_obj_del() argument 452 res = tee_obj_get(utc, uref_to_vaddr(obj), &o); in syscall_storage_obj_del() 475 TEE_Result syscall_storage_obj_rename(unsigned long obj, void *object_id, in syscall_storage_obj_rename() argument [all …]
|
| H A D | tee_obj.c | 21 struct tee_obj **obj) in tee_obj_get() argument 27 *obj = o; in tee_obj_get()
|
| /optee_os/ta/pkcs11/src/ |
| H A D | object.c | 59 uint32_t pkcs11_object2handle(struct pkcs11_object *obj, in pkcs11_object2handle() argument 62 return handle_lookup_handle(get_object_handle_db(session), obj); in pkcs11_object2handle() 83 static void cleanup_volatile_obj_ref(struct pkcs11_object *obj) in cleanup_volatile_obj_ref() argument 85 if (!obj) in cleanup_volatile_obj_ref() 88 LIST_REMOVE(obj, link); in cleanup_volatile_obj_ref() 90 if (obj->key_handle != TEE_HANDLE_NULL) in cleanup_volatile_obj_ref() 91 TEE_FreeTransientObject(obj->key_handle); in cleanup_volatile_obj_ref() 93 if (obj->attribs_hdl != TEE_HANDLE_NULL) in cleanup_volatile_obj_ref() 94 TEE_CloseObject(obj->attribs_hdl); in cleanup_volatile_obj_ref() 96 TEE_Free(obj->attributes); in cleanup_volatile_obj_ref() [all …]
|
| H A D | persistent_token.c | 310 struct pkcs11_object *obj) in create_object_uuid() argument 312 assert(!obj->uuid); in create_object_uuid() 314 obj->uuid = TEE_Malloc(sizeof(TEE_UUID), in create_object_uuid() 316 if (!obj->uuid) in create_object_uuid() 319 obj->token = token; in create_object_uuid() 322 TEE_GenerateRandom(obj->uuid, sizeof(TEE_UUID)); in create_object_uuid() 323 } while (get_persistent_obj_idx(token, obj->uuid) >= 0); in create_object_uuid() 329 struct pkcs11_object *obj) in destroy_object_uuid() argument 331 assert(get_persistent_obj_idx(token, obj->uuid) < 0); in destroy_object_uuid() 333 TEE_Free(obj->uuid); in destroy_object_uuid() [all …]
|
| H A D | processing_asymm.c | 59 struct pkcs11_object *obj) in pkcs2tee_algorithm() argument 140 rc = pkcs2tee_algo_ecdsa(tee_id, proc_params, obj); in pkcs2tee_algorithm() 143 rc = pkcs2tee_algo_ecdh(tee_id, proc_params, obj); in pkcs2tee_algorithm() 164 struct pkcs11_object *obj, in pkcs2tee_key_type() argument 167 enum pkcs11_class_id class = get_class(obj->attributes); in pkcs2tee_key_type() 168 enum pkcs11_key_type type = get_key_type(obj->attributes); in pkcs2tee_key_type() 217 struct pkcs11_object *obj) in allocate_tee_operation() argument 219 uint32_t size = (uint32_t)get_object_key_bit_size(obj); in allocate_tee_operation() 230 if (pkcs2tee_algorithm(&algo, &hash_algo, function, params, obj)) in allocate_tee_operation() 292 struct pkcs11_object *obj, in load_tee_key() argument [all …]
|
| H A D | processing_ec.c | 342 struct pkcs11_object *obj) in load_tee_ec_key_attrs() argument 348 assert(get_key_type(obj->attributes) == PKCS11_CKK_EC); in load_tee_ec_key_attrs() 350 switch (get_class(obj->attributes)) { in load_tee_ec_key_attrs() 358 obj, PKCS11_CKA_EC_PARAMS)) in load_tee_ec_key_attrs() 363 obj, PKCS11_CKA_EC_POINT)) in load_tee_ec_key_attrs() 368 obj, PKCS11_CKA_EC_POINT)) in load_tee_ec_key_attrs() 383 obj, PKCS11_CKA_EC_PARAMS)) in load_tee_ec_key_attrs() 388 obj, PKCS11_CKA_VALUE)) in load_tee_ec_key_attrs() 400 obj, PKCS11_CKA_OPTEE_HIDDEN_EC_POINT)) in load_tee_ec_key_attrs() 404 obj, PKCS11_CKA_EC_POINT)) in load_tee_ec_key_attrs() [all …]
|
| H A D | processing.h | 113 size_t get_object_key_bit_size(struct pkcs11_object *obj); 132 struct pkcs11_object *obj); 201 struct pkcs11_object *obj, 209 struct pkcs11_object *obj); 213 struct pkcs11_object *obj); 221 struct pkcs11_object *obj); 238 struct pkcs11_object *obj); 245 struct pkcs11_object *obj); 284 struct pkcs11_object *obj);
|
| H A D | processing_rsa.c | 60 struct pkcs11_object *obj) in pkcs2tee_validate_rsa_pss() argument 91 modulus_size = get_object_key_bit_size(obj); in pkcs2tee_validate_rsa_pss() 507 static enum pkcs11_rc contains_all_rsa_crt_parameters(struct pkcs11_object *obj) in contains_all_rsa_crt_parameters() argument 520 rc = get_attribute_ptr(obj->attributes, crt_attr[n], &a_ptr, in contains_all_rsa_crt_parameters() 536 struct pkcs11_object *obj) in load_tee_rsa_key_attrs() argument 542 assert(get_key_type(obj->attributes) == PKCS11_CKK_RSA); in load_tee_rsa_key_attrs() 544 switch (get_class(obj->attributes)) { in load_tee_rsa_key_attrs() 552 obj, PKCS11_CKA_MODULUS)) in load_tee_rsa_key_attrs() 556 TEE_ATTR_RSA_PUBLIC_EXPONENT, obj, in load_tee_rsa_key_attrs() 572 obj, PKCS11_CKA_MODULUS)) in load_tee_rsa_key_attrs() [all …]
|
| H A D | processing_symm.c | 104 struct pkcs11_object *obj) in pkcs2tee_key_type() argument 120 enum pkcs11_key_type key_type = get_key_type(obj->attributes); in pkcs2tee_key_type() 122 assert(get_class(obj->attributes) == PKCS11_CKO_SECRET_KEY); in pkcs2tee_key_type() 202 struct pkcs11_object *obj) in allocate_tee_operation() argument 204 uint32_t size = (uint32_t)get_object_key_bit_size(obj); in allocate_tee_operation() 287 struct pkcs11_object *obj, in hash_secret_helper() argument 306 rc = pkcs2tee_load_hashed_attr(tee_attr, TEE_ATTR_SECRET_VALUE, obj, in hash_secret_helper() 323 struct pkcs11_object *obj, in load_tee_key() argument 335 if (obj->key_handle != TEE_HANDLE_NULL) { in load_tee_key() 340 object_size = get_object_key_bit_size(obj); in load_tee_key() [all …]
|
| H A D | processing_digest.c | 113 struct pkcs11_object *obj, in step_digest_operation() argument 163 assert(obj); in step_digest_operation() 168 if (get_class(obj->attributes) != PKCS11_CKO_SECRET_KEY) in step_digest_operation() 171 key_type = get_key_type(obj->attributes); in step_digest_operation() 177 rc = get_attribute_ptr(obj->attributes, PKCS11_CKA_VALUE, in step_digest_operation()
|
| H A D | pkcs11_token.h | 213 enum pkcs11_rc load_persistent_object_attributes(struct pkcs11_object *obj); 214 void release_persistent_object_attributes(struct pkcs11_object *obj); 215 enum pkcs11_rc update_persistent_object_attributes(struct pkcs11_object *obj); 258 struct pkcs11_object *obj); 259 void destroy_object_uuid(struct ck_token *token, struct pkcs11_object *obj); 325 void token_invalidate_object_handles(struct pkcs11_object *obj);
|
| H A D | processing.c | 131 size_t get_object_key_bit_size(struct pkcs11_object *obj) in get_object_key_bit_size() argument 135 struct obj_attrs *attrs = obj->attributes; in get_object_key_bit_size() 611 struct pkcs11_object *obj = NULL; in entry_processing_init() local 642 obj = pkcs11_handle2object(key_handle, session); in entry_processing_init() 643 if (!obj) { in entry_processing_init() 649 rc = set_processing_state(session, function, obj, NULL); in entry_processing_init() 659 if (obj) { in entry_processing_init() 662 obj->attributes); in entry_processing_init() 667 obj->attributes); in entry_processing_init() 673 rc = init_symm_operation(session, function, proc_params, obj); in entry_processing_init() [all …]
|
| H A D | pkcs11_helpers.h | 66 struct pkcs11_object *obj, 72 struct pkcs11_object *obj,
|
| H A D | object.h | 42 uint32_t pkcs11_object2handle(struct pkcs11_object *obj, 52 void cleanup_persistent_object(struct pkcs11_object *obj,
|
| H A D | pkcs11_attributes.h | 176 struct pkcs11_object *obj); 195 struct pkcs11_object *obj,
|
| H A D | pkcs11_attributes.c | 2122 struct pkcs11_object *obj) in attribute_is_exportable() argument 2127 enum pkcs11_class_id key_class = get_class(obj->attributes); in attribute_is_exportable() 2145 rc = get_attribute(obj->attributes, PKCS11_CKA_EXTRACTABLE, in attribute_is_exportable() 2151 rc = get_attribute(obj->attributes, PKCS11_CKA_SENSITIVE, in attribute_is_exportable() 2178 struct pkcs11_object *obj) in attr_is_modifiable_secret_key() argument 2191 return get_bool(obj->attributes, attr->id); in attr_is_modifiable_secret_key() 2195 return !get_bool(obj->attributes, attr->id); in attr_is_modifiable_secret_key() 2209 struct pkcs11_object *obj __unused) in attr_is_modifiable_public_key() 2228 struct pkcs11_object *obj) in attr_is_modifiable_private_key() argument 2249 return get_bool(obj->attributes, attr->id); in attr_is_modifiable_private_key() [all …]
|
| /optee_os/core/drivers/crypto/caam/utils/ |
| H A D | utils_dmaobj.c | 150 static TEE_Result allocate_private(struct caamdmaobj *obj, unsigned int type) in allocate_private() argument 158 obj->priv = priv; in allocate_private() 179 static void add_sgtdata_entry(struct caamdmaobj *obj, struct sgtdata *sgtdata, in add_sgtdata_entry() argument 193 obj->sgtbuf.length += dma->length; in add_sgtdata_entry() 309 struct caamdmaobj *obj) in dmaobj_cache_operation() argument 311 if (!obj->sgtbuf.length) in dmaobj_cache_operation() 314 if (obj->sgtbuf.sgt_type) in dmaobj_cache_operation() 315 caam_sgt_cache_op(op, &obj->sgtbuf, obj->sgtbuf.length); in dmaobj_cache_operation() 316 else if (!obj->sgtbuf.buf->nocache) in dmaobj_cache_operation() 317 cache_operation(op, obj->sgtbuf.buf->data, obj->sgtbuf.length); in dmaobj_cache_operation() [all …]
|
| /optee_os/core/drivers/crypto/caam/include/ |
| H A D | caam_utils_dmaobj.h | 35 TEE_Result caam_dmaobj_init_input(struct caamdmaobj *obj, const void *data, 48 TEE_Result caam_dmaobj_input_sgtbuf(struct caamdmaobj *obj, const void *data, 61 TEE_Result caam_dmaobj_init_output(struct caamdmaobj *obj, void *data, 80 TEE_Result caam_dmaobj_output_sgtbuf(struct caamdmaobj *obj, void *data, 89 void caam_dmaobj_cache_push(struct caamdmaobj *obj); 97 size_t caam_dmaobj_copy_to_orig(struct caamdmaobj *obj); 107 size_t caam_dmaobj_copy_ltrim_to_orig(struct caamdmaobj *obj); 116 void caam_dmaobj_free(struct caamdmaobj *obj); 126 TEE_Result caam_dmaobj_add_first_block(struct caamdmaobj *obj, 139 TEE_Result caam_dmaobj_derive_sgtbuf(struct caamdmaobj *obj, [all …]
|
| /optee_os/core/include/tee/ |
| H A D | tee_svc_storage.h | 20 uint32_t *obj); 25 uint32_t *obj); 27 TEE_Result syscall_storage_obj_del(unsigned long obj); 29 TEE_Result syscall_storage_obj_rename(unsigned long obj, void *object_id, 51 TEE_Result syscall_storage_obj_read(unsigned long obj, void *data, size_t len, 54 TEE_Result syscall_storage_obj_write(unsigned long obj, void *data, 57 TEE_Result syscall_storage_obj_trunc(unsigned long obj, size_t len); 59 TEE_Result syscall_storage_obj_seek(unsigned long obj, int32_t offset,
|
| H A D | tee_pobj.h | 38 struct tee_pobj **obj); 40 void tee_pobj_create_final(struct tee_pobj *obj); 42 TEE_Result tee_pobj_release(struct tee_pobj *obj); 44 TEE_Result tee_pobj_rename(struct tee_pobj *obj, void *obj_id, 51 void tee_pobj_lock_usage(struct tee_pobj *obj); 52 void tee_pobj_unlock_usage(struct tee_pobj *obj);
|
| H A D | tee_svc_cryp.h | 14 TEE_Result syscall_cryp_obj_get_info(unsigned long obj, 16 TEE_Result syscall_cryp_obj_restrict_usage(unsigned long obj, 18 TEE_Result syscall_cryp_obj_get_attr(unsigned long obj, unsigned long attr_id, 22 unsigned long max_key_size, uint32_t *obj); 23 TEE_Result syscall_cryp_obj_close(unsigned long obj); 24 TEE_Result syscall_cryp_obj_reset(unsigned long obj); 25 TEE_Result syscall_cryp_obj_populate(unsigned long obj, 29 TEE_Result syscall_obj_generate_key(unsigned long obj, unsigned long key_size,
|
| /optee_os/lib/libutee/include/ |
| H A D | utee_syscalls.h | 105 TEE_Result _utee_cryp_obj_get_info(unsigned long obj, 107 TEE_Result _utee_cryp_obj_restrict_usage(unsigned long obj, 109 TEE_Result _utee_cryp_obj_get_attr(unsigned long obj, unsigned long attr_id, 115 uint32_t *obj); 116 TEE_Result _utee_cryp_obj_close(unsigned long obj); 117 TEE_Result _utee_cryp_obj_reset(unsigned long obj); 118 TEE_Result _utee_cryp_obj_populate(unsigned long obj, 123 TEE_Result _utee_cryp_obj_generate_key(unsigned long obj, 167 unsigned long flags, uint32_t *obj); 177 size_t len, uint32_t *obj); [all …]
|
| /optee_os/scripts/ |
| H A D | gen_compile_commands.py | 129 for obj in subprocess.check_output([ar, '-t', archive]).decode().split(): 130 yield to_cmdfile(obj) 147 obj = line.rstrip() 148 base, ext = os.path.splitext(obj) 150 sys.exit('{}: module path must end with .o'.format(obj))
|
| H A D | ts_bin_to_c.py | 56 def get_name(obj): argument 59 name = obj.name.decode() 61 name = obj.name
|