Skip to content

Commit 5a83739

Browse files
committed
Fix AES-ECB encrypt failure error handling
AES-ECB would return `CKR_OK` when encryption failed. Instead it should return an appropriate error. F-496
1 parent d3d6d25 commit 5a83739

3 files changed

Lines changed: 459 additions & 0 deletions

File tree

src/internal.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9933,6 +9933,9 @@ static int GetEcbCheckValue(WP11_Object* secret, byte* dataOut,
99339933
XFREE(hash, NULL, DYNAMIC_TYPE_TMP_BUFFER);
99349934
XFREE(input, NULL, DYNAMIC_TYPE_TMP_BUFFER);
99359935

9936+
if (ret != 0)
9937+
return CKR_FUNCTION_FAILED;
9938+
99369939
return CKR_OK;
99379940
}
99389941
#endif

0 commit comments

Comments
 (0)