]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Add TEST_FAIL() condition to omac1_aes_vector()
authorJouni Malinen <j@w1.fi>
Sat, 17 Oct 2015 17:21:24 +0000 (20:21 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 17 Oct 2015 17:40:36 +0000 (20:40 +0300)
This enables more error path testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/aes-omac1.c
src/crypto/crypto_openssl.c

index 375db5735be33344d93b0242710f0a9b96afe9d7..8642516340c69e2ad0e93757b7b679d21e0c695b 100644 (file)
@@ -48,6 +48,9 @@ int omac1_aes_vector(const u8 *key, size_t key_len, size_t num_elem,
        const u8 *pos, *end;
        size_t i, e, left, total_len;
 
+       if (TEST_FAIL())
+               return -1;
+
        ctx = aes_encrypt_init(key, key_len);
        if (ctx == NULL)
                return -1;
index 7dd1a8f0b12150a695590530e3ca43d94b414076..9e344d1de8e0080bcf48cc29dc7f44935777f1fb 100644 (file)
@@ -898,6 +898,9 @@ int omac1_aes_vector(const u8 *key, size_t key_len, size_t num_elem,
        int ret = -1;
        size_t outlen, i;
 
+       if (TEST_FAIL())
+               return -1;
+
        ctx = CMAC_CTX_new();
        if (ctx == NULL)
                return -1;