Lines Matching refs:res

40 	TEE_Result res;  in TEE_GetObjectInfo()  local
42 res = _utee_cryp_obj_get_info((unsigned long)object, objectInfo); in TEE_GetObjectInfo()
44 if (res != TEE_SUCCESS) in TEE_GetObjectInfo()
45 TEE_Panic(res); in TEE_GetObjectInfo()
59 TEE_Result res; in TEE_GetObjectInfo1() local
61 res = _utee_cryp_obj_get_info((unsigned long)object, objectInfo); in TEE_GetObjectInfo1()
63 if (res != TEE_SUCCESS && in TEE_GetObjectInfo1()
64 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_GetObjectInfo1()
65 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_GetObjectInfo1()
66 TEE_Panic(res); in TEE_GetObjectInfo1()
68 return res; in TEE_GetObjectInfo1()
79 TEE_Result res; in TEE_RestrictObjectUsage() local
82 res = _utee_cryp_obj_get_info((unsigned long)object, &objectInfo); in TEE_RestrictObjectUsage()
86 res = TEE_RestrictObjectUsage1(object, objectUsage); in TEE_RestrictObjectUsage()
88 if (res != TEE_SUCCESS) in TEE_RestrictObjectUsage()
89 TEE_Panic(res); in TEE_RestrictObjectUsage()
94 TEE_Result res; in TEE_RestrictObjectUsage1() local
96 res = _utee_cryp_obj_restrict_usage((unsigned long)object, in TEE_RestrictObjectUsage1()
99 if (res != TEE_SUCCESS && in TEE_RestrictObjectUsage1()
100 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_RestrictObjectUsage1()
101 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_RestrictObjectUsage1()
102 TEE_Panic(res); in TEE_RestrictObjectUsage1()
104 return res; in TEE_RestrictObjectUsage1()
111 TEE_Result res; in TEE_GetObjectBufferAttribute() local
117 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_GetObjectBufferAttribute()
118 if (res != TEE_SUCCESS) in TEE_GetObjectBufferAttribute()
123 res = TEE_ERROR_BAD_PARAMETERS; in TEE_GetObjectBufferAttribute()
128 res = _utee_cryp_obj_get_attr((unsigned long)object, attributeID, in TEE_GetObjectBufferAttribute()
133 if (res != TEE_SUCCESS && in TEE_GetObjectBufferAttribute()
134 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_GetObjectBufferAttribute()
135 res != TEE_ERROR_SHORT_BUFFER && in TEE_GetObjectBufferAttribute()
136 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_GetObjectBufferAttribute()
137 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_GetObjectBufferAttribute()
138 TEE_Panic(res); in TEE_GetObjectBufferAttribute()
140 return res; in TEE_GetObjectBufferAttribute()
147 TEE_Result res; in TEE_GetObjectValueAttribute() local
157 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_GetObjectValueAttribute()
158 if (res != TEE_SUCCESS) in TEE_GetObjectValueAttribute()
163 res = TEE_ERROR_BAD_PARAMETERS; in TEE_GetObjectValueAttribute()
167 res = _utee_cryp_obj_get_attr((unsigned long)object, attributeID, buf, in TEE_GetObjectValueAttribute()
171 if (res != TEE_SUCCESS && in TEE_GetObjectValueAttribute()
172 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_GetObjectValueAttribute()
173 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_GetObjectValueAttribute()
174 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_GetObjectValueAttribute()
175 TEE_Panic(res); in TEE_GetObjectValueAttribute()
180 if (res == TEE_SUCCESS) { in TEE_GetObjectValueAttribute()
187 return res; in TEE_GetObjectValueAttribute()
192 TEE_Result res; in TEE_CloseObject() local
197 res = _utee_cryp_obj_close((unsigned long)object); in TEE_CloseObject()
198 if (res != TEE_SUCCESS) in TEE_CloseObject()
199 TEE_Panic(res); in TEE_CloseObject()
208 TEE_Result res; in TEE_AllocateTransientObject() local
213 res = _utee_cryp_obj_alloc(objectType, maxKeySize, &obj); in TEE_AllocateTransientObject()
215 if (res != TEE_SUCCESS && in TEE_AllocateTransientObject()
216 res != TEE_ERROR_OUT_OF_MEMORY && in TEE_AllocateTransientObject()
217 res != TEE_ERROR_NOT_SUPPORTED) in TEE_AllocateTransientObject()
218 TEE_Panic(res); in TEE_AllocateTransientObject()
220 if (res == TEE_SUCCESS) in TEE_AllocateTransientObject()
223 return res; in TEE_AllocateTransientObject()
228 TEE_Result res; in TEE_FreeTransientObject() local
234 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_FreeTransientObject()
235 if (res != TEE_SUCCESS) in TEE_FreeTransientObject()
236 TEE_Panic(res); in TEE_FreeTransientObject()
241 res = _utee_cryp_obj_close((unsigned long)object); in TEE_FreeTransientObject()
242 if (res != TEE_SUCCESS) in TEE_FreeTransientObject()
243 TEE_Panic(res); in TEE_FreeTransientObject()
248 TEE_Result res; in TEE_ResetTransientObject() local
254 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_ResetTransientObject()
255 if (res != TEE_SUCCESS) in TEE_ResetTransientObject()
256 TEE_Panic(res); in TEE_ResetTransientObject()
261 res = _utee_cryp_obj_reset((unsigned long)object); in TEE_ResetTransientObject()
262 if (res != TEE_SUCCESS) in TEE_ResetTransientObject()
263 TEE_Panic(res); in TEE_ResetTransientObject()
270 TEE_Result res; in TEE_PopulateTransientObject() local
276 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_PopulateTransientObject()
277 if (res != TEE_SUCCESS) in TEE_PopulateTransientObject()
278 TEE_Panic(res); in TEE_PopulateTransientObject()
289 res = _utee_cryp_obj_populate((unsigned long)object, ua, attrCount); in TEE_PopulateTransientObject()
290 if (res != TEE_SUCCESS && res != TEE_ERROR_BAD_PARAMETERS) in TEE_PopulateTransientObject()
291 TEE_Panic(res); in TEE_PopulateTransientObject()
292 return res; in TEE_PopulateTransientObject()
328 TEE_Result res; in TEE_CopyObjectAttributes() local
331 res = _utee_cryp_obj_get_info((unsigned long)srcObject, &src_info); in TEE_CopyObjectAttributes()
335 res = TEE_CopyObjectAttributes1(destObject, srcObject); in TEE_CopyObjectAttributes()
336 if (res != TEE_SUCCESS) in TEE_CopyObjectAttributes()
337 TEE_Panic(res); in TEE_CopyObjectAttributes()
343 TEE_Result res; in TEE_CopyObjectAttributes1() local
347 res = _utee_cryp_obj_get_info((unsigned long)destObject, &dst_info); in TEE_CopyObjectAttributes1()
348 if (res != TEE_SUCCESS) in TEE_CopyObjectAttributes1()
351 res = _utee_cryp_obj_get_info((unsigned long)srcObject, &src_info); in TEE_CopyObjectAttributes1()
352 if (res != TEE_SUCCESS) in TEE_CopyObjectAttributes1()
364 res = _utee_cryp_obj_copy((unsigned long)destObject, in TEE_CopyObjectAttributes1()
368 if (res != TEE_SUCCESS && in TEE_CopyObjectAttributes1()
369 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_CopyObjectAttributes1()
370 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_CopyObjectAttributes1()
371 TEE_Panic(res); in TEE_CopyObjectAttributes1()
373 return res; in TEE_CopyObjectAttributes1()
379 TEE_Result res; in TEE_GenerateKey() local
385 res = _utee_cryp_obj_generate_key((unsigned long)object, keySize, in TEE_GenerateKey()
388 if (res != TEE_SUCCESS && res != TEE_ERROR_BAD_PARAMETERS) in TEE_GenerateKey()
389 TEE_Panic(res); in TEE_GenerateKey()
391 return res; in TEE_GenerateKey()
400 TEE_Result res; in TEE_OpenPersistentObject() local
404 res = TEE_ERROR_ITEM_NOT_FOUND; in TEE_OpenPersistentObject()
410 res = _utee_storage_obj_open(storageID, objectID, objectIDLen, flags, in TEE_OpenPersistentObject()
412 if (res == TEE_SUCCESS) in TEE_OpenPersistentObject()
416 if (res != TEE_SUCCESS && in TEE_OpenPersistentObject()
417 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_OpenPersistentObject()
418 res != TEE_ERROR_ACCESS_CONFLICT && in TEE_OpenPersistentObject()
419 res != TEE_ERROR_OUT_OF_MEMORY && in TEE_OpenPersistentObject()
420 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_OpenPersistentObject()
421 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_OpenPersistentObject()
422 TEE_Panic(res); in TEE_OpenPersistentObject()
424 if (res != TEE_SUCCESS) in TEE_OpenPersistentObject()
427 return res; in TEE_OpenPersistentObject()
437 TEE_Result res; in TEE_CreatePersistentObject() local
441 res = TEE_ERROR_ITEM_NOT_FOUND; in TEE_CreatePersistentObject()
447 res = _utee_storage_obj_create(storageID, objectID, objectIDLen, flags, in TEE_CreatePersistentObject()
451 if (res == TEE_SUCCESS) in TEE_CreatePersistentObject()
455 if (res != TEE_SUCCESS && in TEE_CreatePersistentObject()
456 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_CreatePersistentObject()
457 res != TEE_ERROR_ACCESS_CONFLICT && in TEE_CreatePersistentObject()
458 res != TEE_ERROR_OUT_OF_MEMORY && in TEE_CreatePersistentObject()
459 res != TEE_ERROR_STORAGE_NO_SPACE && in TEE_CreatePersistentObject()
460 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_CreatePersistentObject()
461 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_CreatePersistentObject()
462 TEE_Panic(res); in TEE_CreatePersistentObject()
464 if (res != TEE_SUCCESS) in TEE_CreatePersistentObject()
467 return res; in TEE_CreatePersistentObject()
478 TEE_Result res; in TEE_CloseAndDeletePersistentObject() local
483 res = TEE_CloseAndDeletePersistentObject1(object); in TEE_CloseAndDeletePersistentObject()
485 if (res != TEE_SUCCESS) in TEE_CloseAndDeletePersistentObject()
491 TEE_Result res; in TEE_CloseAndDeletePersistentObject1() local
496 res = _utee_storage_obj_del((unsigned long)object); in TEE_CloseAndDeletePersistentObject1()
498 if (res != TEE_SUCCESS && res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_CloseAndDeletePersistentObject1()
499 TEE_Panic(res); in TEE_CloseAndDeletePersistentObject1()
501 return res; in TEE_CloseAndDeletePersistentObject1()
509 TEE_Result res; in TEE_RenamePersistentObject() local
512 res = TEE_ERROR_ITEM_NOT_FOUND; in TEE_RenamePersistentObject()
516 res = _utee_storage_obj_rename((unsigned long)object, newObjectID, in TEE_RenamePersistentObject()
520 if (res != TEE_SUCCESS && in TEE_RenamePersistentObject()
521 res != TEE_ERROR_ACCESS_CONFLICT && in TEE_RenamePersistentObject()
522 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_RenamePersistentObject()
523 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_RenamePersistentObject()
524 TEE_Panic(res); in TEE_RenamePersistentObject()
526 return res; in TEE_RenamePersistentObject()
532 TEE_Result res; in TEE_AllocatePersistentObjectEnumerator() local
538 res = _utee_storage_alloc_enum(&oe); in TEE_AllocatePersistentObjectEnumerator()
540 if (res != TEE_SUCCESS) in TEE_AllocatePersistentObjectEnumerator()
545 if (res != TEE_SUCCESS && in TEE_AllocatePersistentObjectEnumerator()
546 res != TEE_ERROR_ACCESS_CONFLICT) in TEE_AllocatePersistentObjectEnumerator()
547 TEE_Panic(res); in TEE_AllocatePersistentObjectEnumerator()
549 return res; in TEE_AllocatePersistentObjectEnumerator()
554 TEE_Result res; in TEE_FreePersistentObjectEnumerator() local
559 res = _utee_storage_free_enum((unsigned long)objectEnumerator); in TEE_FreePersistentObjectEnumerator()
561 if (res != TEE_SUCCESS) in TEE_FreePersistentObjectEnumerator()
562 TEE_Panic(res); in TEE_FreePersistentObjectEnumerator()
567 TEE_Result res; in TEE_ResetPersistentObjectEnumerator() local
572 res = _utee_storage_reset_enum((unsigned long)objectEnumerator); in TEE_ResetPersistentObjectEnumerator()
574 if (res != TEE_SUCCESS) in TEE_ResetPersistentObjectEnumerator()
575 TEE_Panic(res); in TEE_ResetPersistentObjectEnumerator()
582 TEE_Result res; in TEE_StartPersistentObjectEnumerator() local
584 res = _utee_storage_start_enum((unsigned long)objectEnumerator, in TEE_StartPersistentObjectEnumerator()
587 if (res != TEE_SUCCESS && in TEE_StartPersistentObjectEnumerator()
588 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_StartPersistentObjectEnumerator()
589 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_StartPersistentObjectEnumerator()
590 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_StartPersistentObjectEnumerator()
591 TEE_Panic(res); in TEE_StartPersistentObjectEnumerator()
593 return res; in TEE_StartPersistentObjectEnumerator()
600 TEE_Result res; in TEE_GetNextPersistentObject() local
610 res = TEE_ERROR_BAD_PARAMETERS; in TEE_GetNextPersistentObject()
619 res = _utee_storage_next_enum((unsigned long)objectEnumerator, in TEE_GetNextPersistentObject()
624 if (res != TEE_SUCCESS && in TEE_GetNextPersistentObject()
625 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_GetNextPersistentObject()
626 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_GetNextPersistentObject()
627 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_GetNextPersistentObject()
628 TEE_Panic(res); in TEE_GetNextPersistentObject()
630 return res; in TEE_GetNextPersistentObject()
638 TEE_Result res; in TEE_ReadObjectData() local
642 res = TEE_ERROR_BAD_PARAMETERS; in TEE_ReadObjectData()
648 res = _utee_storage_obj_read((unsigned long)object, buffer, size, in TEE_ReadObjectData()
653 if (res != TEE_SUCCESS && in TEE_ReadObjectData()
654 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_ReadObjectData()
655 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_ReadObjectData()
656 TEE_Panic(res); in TEE_ReadObjectData()
658 return res; in TEE_ReadObjectData()
664 TEE_Result res; in TEE_WriteObjectData() local
667 res = TEE_ERROR_BAD_PARAMETERS; in TEE_WriteObjectData()
672 res = TEE_ERROR_OVERFLOW; in TEE_WriteObjectData()
676 res = _utee_storage_obj_write((unsigned long)object, buffer, size); in TEE_WriteObjectData()
679 if (res != TEE_SUCCESS && in TEE_WriteObjectData()
680 res != TEE_ERROR_STORAGE_NO_SPACE && in TEE_WriteObjectData()
681 res != TEE_ERROR_OVERFLOW && in TEE_WriteObjectData()
682 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_WriteObjectData()
683 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_WriteObjectData()
684 TEE_Panic(res); in TEE_WriteObjectData()
686 return res; in TEE_WriteObjectData()
691 TEE_Result res; in TEE_TruncateObjectData() local
694 res = TEE_ERROR_BAD_PARAMETERS; in TEE_TruncateObjectData()
698 res = _utee_storage_obj_trunc((unsigned long)object, size); in TEE_TruncateObjectData()
701 if (res != TEE_SUCCESS && in TEE_TruncateObjectData()
702 res != TEE_ERROR_STORAGE_NO_SPACE && in TEE_TruncateObjectData()
703 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_TruncateObjectData()
704 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_TruncateObjectData()
705 TEE_Panic(res); in TEE_TruncateObjectData()
707 return res; in TEE_TruncateObjectData()
713 TEE_Result res; in TEE_SeekObjectData() local
717 res = TEE_ERROR_BAD_PARAMETERS; in TEE_SeekObjectData()
721 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_SeekObjectData()
722 if (res != TEE_SUCCESS) in TEE_SeekObjectData()
728 res = TEE_ERROR_OVERFLOW; in TEE_SeekObjectData()
738 res = TEE_ERROR_OVERFLOW; in TEE_SeekObjectData()
746 res = TEE_ERROR_OVERFLOW; in TEE_SeekObjectData()
751 res = TEE_ERROR_ITEM_NOT_FOUND; in TEE_SeekObjectData()
755 res = _utee_storage_obj_seek((unsigned long)object, offset, whence); in TEE_SeekObjectData()
758 if (res != TEE_SUCCESS && in TEE_SeekObjectData()
759 res != TEE_ERROR_OVERFLOW && in TEE_SeekObjectData()
760 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_SeekObjectData()
761 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_SeekObjectData()
762 TEE_Panic(res); in TEE_SeekObjectData()
764 return res; in TEE_SeekObjectData()