tests: Add TEST_FAIL() condition to omac1_aes_vector()
This enables more error path testing. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
0504d2da12
commit
cc4f3d6ea7
2 changed files with 6 additions and 0 deletions
|
@ -48,6 +48,9 @@ int omac1_aes_vector(const u8 *key, size_t key_len, size_t num_elem,
|
||||||
const u8 *pos, *end;
|
const u8 *pos, *end;
|
||||||
size_t i, e, left, total_len;
|
size_t i, e, left, total_len;
|
||||||
|
|
||||||
|
if (TEST_FAIL())
|
||||||
|
return -1;
|
||||||
|
|
||||||
ctx = aes_encrypt_init(key, key_len);
|
ctx = aes_encrypt_init(key, key_len);
|
||||||
if (ctx == NULL)
|
if (ctx == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -898,6 +898,9 @@ int omac1_aes_vector(const u8 *key, size_t key_len, size_t num_elem,
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
size_t outlen, i;
|
size_t outlen, i;
|
||||||
|
|
||||||
|
if (TEST_FAIL())
|
||||||
|
return -1;
|
||||||
|
|
||||||
ctx = CMAC_CTX_new();
|
ctx = CMAC_CTX_new();
|
||||||
if (ctx == NULL)
|
if (ctx == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue