summaryrefslogtreecommitdiff
path: root/src/crypto/aes-cbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/aes-cbc.c')
-rw-r--r--src/crypto/aes-cbc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/crypto/aes-cbc.c b/src/crypto/aes-cbc.c
index 2833cfcc840d9..0835f2cfb77ec 100644
--- a/src/crypto/aes-cbc.c
+++ b/src/crypto/aes-cbc.c
@@ -28,6 +28,9 @@ int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
u8 *pos = data;
int i, j, blocks;
+ if (TEST_FAIL())
+ return -1;
+
ctx = aes_encrypt_init(key, 16);
if (ctx == NULL)
return -1;
@@ -61,6 +64,9 @@ int aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
u8 *pos = data;
int i, j, blocks;
+ if (TEST_FAIL())
+ return -1;
+
ctx = aes_decrypt_init(key, 16);
if (ctx == NULL)
return -1;