Lines Matching refs:res
59 TEE_Result res = TEE_SUCCESS; in TEE_GetObjectInfo() local
61 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_GetObjectInfo()
63 if (res != TEE_SUCCESS) in TEE_GetObjectInfo()
64 TEE_Panic(res); in TEE_GetObjectInfo()
88 TEE_Result res = TEE_SUCCESS; in __GP11_TEE_GetObjectInfo() local
90 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in __GP11_TEE_GetObjectInfo()
92 if (res != TEE_SUCCESS) in __GP11_TEE_GetObjectInfo()
93 TEE_Panic(res); in __GP11_TEE_GetObjectInfo()
117 TEE_Result res = TEE_SUCCESS; in TEE_GetObjectInfo1() local
119 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_GetObjectInfo1()
121 if (res != TEE_SUCCESS && in TEE_GetObjectInfo1()
122 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_GetObjectInfo1()
123 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_GetObjectInfo1()
124 TEE_Panic(res); in TEE_GetObjectInfo1()
134 return res; in TEE_GetObjectInfo1()
141 TEE_Result res = TEE_SUCCESS; in __GP11_TEE_GetObjectInfo1() local
143 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in __GP11_TEE_GetObjectInfo1()
145 if (res != TEE_SUCCESS && in __GP11_TEE_GetObjectInfo1()
146 res != TEE_ERROR_CORRUPT_OBJECT && in __GP11_TEE_GetObjectInfo1()
147 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in __GP11_TEE_GetObjectInfo1()
148 TEE_Panic(res); in __GP11_TEE_GetObjectInfo1()
158 return res; in __GP11_TEE_GetObjectInfo1()
170 TEE_Result res = TEE_SUCCESS; in TEE_RestrictObjectUsage() local
172 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_RestrictObjectUsage()
176 res = TEE_RestrictObjectUsage1(object, objectUsage); in TEE_RestrictObjectUsage()
178 if (res != TEE_SUCCESS) in TEE_RestrictObjectUsage()
179 TEE_Panic(res); in TEE_RestrictObjectUsage()
184 TEE_Result res; in TEE_RestrictObjectUsage1() local
186 res = _utee_cryp_obj_restrict_usage((unsigned long)object, in TEE_RestrictObjectUsage1()
189 if (res != TEE_SUCCESS && in TEE_RestrictObjectUsage1()
190 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_RestrictObjectUsage1()
191 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_RestrictObjectUsage1()
192 TEE_Panic(res); in TEE_RestrictObjectUsage1()
194 return res; in TEE_RestrictObjectUsage1()
202 TEE_Result res = TEE_SUCCESS; in TEE_GetObjectBufferAttribute() local
207 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_GetObjectBufferAttribute()
208 if (res != TEE_SUCCESS) in TEE_GetObjectBufferAttribute()
213 res = TEE_ERROR_BAD_PARAMETERS; in TEE_GetObjectBufferAttribute()
218 res = _utee_cryp_obj_get_attr((unsigned long)object, attributeID, in TEE_GetObjectBufferAttribute()
223 if (res != TEE_SUCCESS && in TEE_GetObjectBufferAttribute()
224 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_GetObjectBufferAttribute()
225 res != TEE_ERROR_SHORT_BUFFER && in TEE_GetObjectBufferAttribute()
226 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_GetObjectBufferAttribute()
227 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_GetObjectBufferAttribute()
228 TEE_Panic(res); in TEE_GetObjectBufferAttribute()
230 return res; in TEE_GetObjectBufferAttribute()
237 TEE_Result res = TEE_SUCCESS; in __GP11_TEE_GetObjectBufferAttribute() local
242 res = TEE_GetObjectBufferAttribute(object, attributeID, buffer, &l); in __GP11_TEE_GetObjectBufferAttribute()
244 return res; in __GP11_TEE_GetObjectBufferAttribute()
252 TEE_Result res = TEE_SUCCESS; in TEE_GetObjectValueAttribute() local
261 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_GetObjectValueAttribute()
262 if (res != TEE_SUCCESS) in TEE_GetObjectValueAttribute()
267 res = TEE_ERROR_BAD_PARAMETERS; in TEE_GetObjectValueAttribute()
271 res = _utee_cryp_obj_get_attr((unsigned long)object, attributeID, buf, in TEE_GetObjectValueAttribute()
275 if (res != TEE_SUCCESS && in TEE_GetObjectValueAttribute()
276 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_GetObjectValueAttribute()
277 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_GetObjectValueAttribute()
278 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_GetObjectValueAttribute()
279 TEE_Panic(res); in TEE_GetObjectValueAttribute()
284 if (res == TEE_SUCCESS) { in TEE_GetObjectValueAttribute()
291 return res; in TEE_GetObjectValueAttribute()
296 TEE_Result res; in TEE_CloseObject() local
301 res = _utee_cryp_obj_close((unsigned long)object); in TEE_CloseObject()
302 if (res != TEE_SUCCESS) in TEE_CloseObject()
303 TEE_Panic(res); in TEE_CloseObject()
323 TEE_Result res; in __GP11_TEE_AllocateTransientObject() local
328 res = _utee_cryp_obj_alloc(objectType, maxKeySize, &obj); in __GP11_TEE_AllocateTransientObject()
330 if (res != TEE_SUCCESS && in __GP11_TEE_AllocateTransientObject()
331 res != TEE_ERROR_OUT_OF_MEMORY && in __GP11_TEE_AllocateTransientObject()
332 res != TEE_ERROR_NOT_SUPPORTED) in __GP11_TEE_AllocateTransientObject()
333 TEE_Panic(res); in __GP11_TEE_AllocateTransientObject()
335 if (res == TEE_SUCCESS) in __GP11_TEE_AllocateTransientObject()
338 return res; in __GP11_TEE_AllocateTransientObject()
344 TEE_Result res = TEE_SUCCESS; in TEE_FreeTransientObject() local
349 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_FreeTransientObject()
350 if (res != TEE_SUCCESS) in TEE_FreeTransientObject()
351 TEE_Panic(res); in TEE_FreeTransientObject()
356 res = _utee_cryp_obj_close((unsigned long)object); in TEE_FreeTransientObject()
357 if (res != TEE_SUCCESS) in TEE_FreeTransientObject()
358 TEE_Panic(res); in TEE_FreeTransientObject()
364 TEE_Result res = TEE_SUCCESS; in TEE_ResetTransientObject() local
369 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_ResetTransientObject()
370 if (res != TEE_SUCCESS) in TEE_ResetTransientObject()
371 TEE_Panic(res); in TEE_ResetTransientObject()
376 res = _utee_cryp_obj_reset((unsigned long)object); in TEE_ResetTransientObject()
377 if (res != TEE_SUCCESS) in TEE_ResetTransientObject()
378 TEE_Panic(res); in TEE_ResetTransientObject()
387 TEE_Result res = TEE_SUCCESS; in TEE_PopulateTransientObject() local
391 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_PopulateTransientObject()
392 if (res != TEE_SUCCESS) in TEE_PopulateTransientObject()
393 TEE_Panic(res); in TEE_PopulateTransientObject()
404 res = _utee_cryp_obj_populate((unsigned long)object, ua, attrCount); in TEE_PopulateTransientObject()
405 if (res != TEE_SUCCESS && res != TEE_ERROR_BAD_PARAMETERS) in TEE_PopulateTransientObject()
406 TEE_Panic(res); in TEE_PopulateTransientObject()
407 return res; in TEE_PopulateTransientObject()
416 TEE_Result res = TEE_SUCCESS; in __GP11_TEE_PopulateTransientObject() local
420 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in __GP11_TEE_PopulateTransientObject()
421 if (res != TEE_SUCCESS) in __GP11_TEE_PopulateTransientObject()
422 TEE_Panic(res); in __GP11_TEE_PopulateTransientObject()
433 res = _utee_cryp_obj_populate((unsigned long)object, ua, attrCount); in __GP11_TEE_PopulateTransientObject()
434 if (res != TEE_SUCCESS && res != TEE_ERROR_BAD_PARAMETERS) in __GP11_TEE_PopulateTransientObject()
435 TEE_Panic(res); in __GP11_TEE_PopulateTransientObject()
436 return res; in __GP11_TEE_PopulateTransientObject()
499 TEE_Result res = TEE_SUCCESS; in TEE_CopyObjectAttributes() local
501 res = _utee_cryp_obj_get_info((unsigned long)srcObject, &src_info); in TEE_CopyObjectAttributes()
505 res = TEE_CopyObjectAttributes1(destObject, srcObject); in TEE_CopyObjectAttributes()
506 if (res != TEE_SUCCESS) in TEE_CopyObjectAttributes()
507 TEE_Panic(res); in TEE_CopyObjectAttributes()
515 TEE_Result res = TEE_SUCCESS; in TEE_CopyObjectAttributes1() local
517 res = _utee_cryp_obj_get_info((unsigned long)destObject, &dst_info); in TEE_CopyObjectAttributes1()
518 if (res != TEE_SUCCESS) in TEE_CopyObjectAttributes1()
521 res = _utee_cryp_obj_get_info((unsigned long)srcObject, &src_info); in TEE_CopyObjectAttributes1()
522 if (res != TEE_SUCCESS) in TEE_CopyObjectAttributes1()
534 res = _utee_cryp_obj_copy((unsigned long)destObject, in TEE_CopyObjectAttributes1()
538 if (res != TEE_SUCCESS && in TEE_CopyObjectAttributes1()
539 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_CopyObjectAttributes1()
540 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_CopyObjectAttributes1()
541 TEE_Panic(res); in TEE_CopyObjectAttributes1()
543 return res; in TEE_CopyObjectAttributes1()
549 TEE_Result res; in TEE_GenerateKey() local
555 res = _utee_cryp_obj_generate_key((unsigned long)object, keySize, in TEE_GenerateKey()
558 if (res != TEE_SUCCESS && res != TEE_ERROR_BAD_PARAMETERS) in TEE_GenerateKey()
559 TEE_Panic(res); in TEE_GenerateKey()
561 return res; in TEE_GenerateKey()
568 TEE_Result res = TEE_SUCCESS; in __GP11_TEE_GenerateKey() local
574 res = _utee_cryp_obj_generate_key((unsigned long)object, keySize, in __GP11_TEE_GenerateKey()
577 if (res != TEE_SUCCESS && res != TEE_ERROR_BAD_PARAMETERS) in __GP11_TEE_GenerateKey()
578 TEE_Panic(res); in __GP11_TEE_GenerateKey()
580 return res; in __GP11_TEE_GenerateKey()
589 TEE_Result res; in TEE_OpenPersistentObject() local
594 res = _utee_storage_obj_open(storageID, objectID, objectIDLen, flags, in TEE_OpenPersistentObject()
596 if (res == TEE_SUCCESS) in TEE_OpenPersistentObject()
599 if (res != TEE_SUCCESS && in TEE_OpenPersistentObject()
600 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_OpenPersistentObject()
601 res != TEE_ERROR_ACCESS_CONFLICT && in TEE_OpenPersistentObject()
602 res != TEE_ERROR_OUT_OF_MEMORY && in TEE_OpenPersistentObject()
603 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_OpenPersistentObject()
604 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_OpenPersistentObject()
605 TEE_Panic(res); in TEE_OpenPersistentObject()
607 if (res != TEE_SUCCESS) in TEE_OpenPersistentObject()
610 return res; in TEE_OpenPersistentObject()
629 TEE_Result res = TEE_SUCCESS; in TEE_CreatePersistentObject() local
638 res = _utee_storage_obj_create(storageID, objectID, objectIDLen, flags, in TEE_CreatePersistentObject()
642 if (res == TEE_SUCCESS && object) in TEE_CreatePersistentObject()
645 if (res != TEE_SUCCESS && in TEE_CreatePersistentObject()
646 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_CreatePersistentObject()
647 res != TEE_ERROR_ACCESS_CONFLICT && in TEE_CreatePersistentObject()
648 res != TEE_ERROR_OUT_OF_MEMORY && in TEE_CreatePersistentObject()
649 res != TEE_ERROR_STORAGE_NO_SPACE && in TEE_CreatePersistentObject()
650 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_CreatePersistentObject()
651 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_CreatePersistentObject()
652 TEE_Panic(res); in TEE_CreatePersistentObject()
654 if (res != TEE_SUCCESS && object) in TEE_CreatePersistentObject()
657 return res; in TEE_CreatePersistentObject()
684 TEE_Result res; in TEE_CloseAndDeletePersistentObject() local
689 res = TEE_CloseAndDeletePersistentObject1(object); in TEE_CloseAndDeletePersistentObject()
691 if (res != TEE_SUCCESS) in TEE_CloseAndDeletePersistentObject()
697 TEE_Result res; in TEE_CloseAndDeletePersistentObject1() local
702 res = _utee_storage_obj_del((unsigned long)object); in TEE_CloseAndDeletePersistentObject1()
704 if (res != TEE_SUCCESS && res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_CloseAndDeletePersistentObject1()
705 TEE_Panic(res); in TEE_CloseAndDeletePersistentObject1()
707 return res; in TEE_CloseAndDeletePersistentObject1()
715 TEE_Result res; in TEE_RenamePersistentObject() local
718 res = TEE_ERROR_ITEM_NOT_FOUND; in TEE_RenamePersistentObject()
722 res = _utee_storage_obj_rename((unsigned long)object, newObjectID, in TEE_RenamePersistentObject()
726 if (res != TEE_SUCCESS && in TEE_RenamePersistentObject()
727 res != TEE_ERROR_ACCESS_CONFLICT && in TEE_RenamePersistentObject()
728 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_RenamePersistentObject()
729 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_RenamePersistentObject()
730 TEE_Panic(res); in TEE_RenamePersistentObject()
732 return res; in TEE_RenamePersistentObject()
745 TEE_Result res; in TEE_AllocatePersistentObjectEnumerator() local
751 res = _utee_storage_alloc_enum(&oe); in TEE_AllocatePersistentObjectEnumerator()
753 if (res != TEE_SUCCESS) in TEE_AllocatePersistentObjectEnumerator()
758 if (res != TEE_SUCCESS && in TEE_AllocatePersistentObjectEnumerator()
759 res != TEE_ERROR_ACCESS_CONFLICT) in TEE_AllocatePersistentObjectEnumerator()
760 TEE_Panic(res); in TEE_AllocatePersistentObjectEnumerator()
762 return res; in TEE_AllocatePersistentObjectEnumerator()
767 TEE_Result res; in TEE_FreePersistentObjectEnumerator() local
772 res = _utee_storage_free_enum((unsigned long)objectEnumerator); in TEE_FreePersistentObjectEnumerator()
774 if (res != TEE_SUCCESS) in TEE_FreePersistentObjectEnumerator()
775 TEE_Panic(res); in TEE_FreePersistentObjectEnumerator()
780 TEE_Result res; in TEE_ResetPersistentObjectEnumerator() local
785 res = _utee_storage_reset_enum((unsigned long)objectEnumerator); in TEE_ResetPersistentObjectEnumerator()
787 if (res != TEE_SUCCESS) in TEE_ResetPersistentObjectEnumerator()
788 TEE_Panic(res); in TEE_ResetPersistentObjectEnumerator()
795 TEE_Result res; in TEE_StartPersistentObjectEnumerator() local
797 res = _utee_storage_start_enum((unsigned long)objectEnumerator, in TEE_StartPersistentObjectEnumerator()
800 if (res != TEE_SUCCESS && in TEE_StartPersistentObjectEnumerator()
801 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_StartPersistentObjectEnumerator()
802 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_StartPersistentObjectEnumerator()
803 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_StartPersistentObjectEnumerator()
804 TEE_Panic(res); in TEE_StartPersistentObjectEnumerator()
806 return res; in TEE_StartPersistentObjectEnumerator()
814 TEE_Result res = TEE_SUCCESS; in TEE_GetNextPersistentObject() local
822 res = TEE_ERROR_BAD_PARAMETERS; in TEE_GetNextPersistentObject()
827 res = _utee_storage_next_enum((unsigned long)objectEnumerator, in TEE_GetNextPersistentObject()
841 if (res != TEE_SUCCESS && in TEE_GetNextPersistentObject()
842 res != TEE_ERROR_ITEM_NOT_FOUND && in TEE_GetNextPersistentObject()
843 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_GetNextPersistentObject()
844 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_GetNextPersistentObject()
845 TEE_Panic(res); in TEE_GetNextPersistentObject()
847 return res; in TEE_GetNextPersistentObject()
856 TEE_Result res = TEE_SUCCESS; in __GP11_TEE_GetNextPersistentObject() local
864 res = TEE_ERROR_BAD_PARAMETERS; in __GP11_TEE_GetNextPersistentObject()
869 res = _utee_storage_next_enum((unsigned long)objectEnumerator, in __GP11_TEE_GetNextPersistentObject()
883 if (res != TEE_SUCCESS && in __GP11_TEE_GetNextPersistentObject()
884 res != TEE_ERROR_ITEM_NOT_FOUND && in __GP11_TEE_GetNextPersistentObject()
885 res != TEE_ERROR_CORRUPT_OBJECT && in __GP11_TEE_GetNextPersistentObject()
886 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in __GP11_TEE_GetNextPersistentObject()
887 TEE_Panic(res); in __GP11_TEE_GetNextPersistentObject()
889 return res; in __GP11_TEE_GetNextPersistentObject()
897 TEE_Result res; in TEE_ReadObjectData() local
901 res = TEE_ERROR_BAD_PARAMETERS; in TEE_ReadObjectData()
907 res = _utee_storage_obj_read((unsigned long)object, buffer, size, in TEE_ReadObjectData()
912 if (res != TEE_SUCCESS && in TEE_ReadObjectData()
913 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_ReadObjectData()
914 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_ReadObjectData()
915 TEE_Panic(res); in TEE_ReadObjectData()
917 return res; in TEE_ReadObjectData()
923 TEE_Result res = TEE_SUCCESS; in __GP11_TEE_ReadObjectData() local
928 res = TEE_ReadObjectData(object, buffer, size, &cnt); in __GP11_TEE_ReadObjectData()
930 return res; in __GP11_TEE_ReadObjectData()
936 TEE_Result res; in TEE_WriteObjectData() local
939 res = TEE_ERROR_BAD_PARAMETERS; in TEE_WriteObjectData()
944 res = TEE_ERROR_OVERFLOW; in TEE_WriteObjectData()
948 res = _utee_storage_obj_write((unsigned long)object, buffer, size); in TEE_WriteObjectData()
951 if (res != TEE_SUCCESS && in TEE_WriteObjectData()
952 res != TEE_ERROR_STORAGE_NO_SPACE && in TEE_WriteObjectData()
953 res != TEE_ERROR_OVERFLOW && in TEE_WriteObjectData()
954 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_WriteObjectData()
955 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_WriteObjectData()
956 TEE_Panic(res); in TEE_WriteObjectData()
958 return res; in TEE_WriteObjectData()
969 TEE_Result res; in TEE_TruncateObjectData() local
972 res = TEE_ERROR_BAD_PARAMETERS; in TEE_TruncateObjectData()
976 res = _utee_storage_obj_trunc((unsigned long)object, size); in TEE_TruncateObjectData()
979 if (res != TEE_SUCCESS && in TEE_TruncateObjectData()
980 res != TEE_ERROR_STORAGE_NO_SPACE && in TEE_TruncateObjectData()
981 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_TruncateObjectData()
982 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_TruncateObjectData()
983 TEE_Panic(res); in TEE_TruncateObjectData()
985 return res; in TEE_TruncateObjectData()
998 TEE_Result res = TEE_SUCCESS; in TEE_SeekObjectData() local
1001 res = TEE_ERROR_BAD_PARAMETERS; in TEE_SeekObjectData()
1005 res = _utee_cryp_obj_get_info((unsigned long)object, &info); in TEE_SeekObjectData()
1006 if (res != TEE_SUCCESS) in TEE_SeekObjectData()
1012 res = TEE_ERROR_OVERFLOW; in TEE_SeekObjectData()
1020 res = TEE_ERROR_OVERFLOW; in TEE_SeekObjectData()
1029 res = TEE_ERROR_OVERFLOW; in TEE_SeekObjectData()
1034 res = TEE_ERROR_ITEM_NOT_FOUND; in TEE_SeekObjectData()
1038 res = _utee_storage_obj_seek((unsigned long)object, offset, whence); in TEE_SeekObjectData()
1041 if (res != TEE_SUCCESS && in TEE_SeekObjectData()
1042 res != TEE_ERROR_OVERFLOW && in TEE_SeekObjectData()
1043 res != TEE_ERROR_CORRUPT_OBJECT && in TEE_SeekObjectData()
1044 res != TEE_ERROR_STORAGE_NOT_AVAILABLE) in TEE_SeekObjectData()
1045 TEE_Panic(res); in TEE_SeekObjectData()
1047 return res; in TEE_SeekObjectData()