]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add TEST_FAIL() to aes_encrypt_init() with internal crypto
authorJouni Malinen <j@w1.fi>
Sat, 16 Mar 2019 16:45:51 +0000 (18:45 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 16 Mar 2019 16:52:09 +0000 (18:52 +0200)
This is needed for the hwsim test cases ap_wpa2_eap_psk_oom and
ap_wpa2_eap_sim_oom.

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

index 9fdb4f35cb9b794a03f14bac5a98d9d764eec32e..baeffcaf630c39e703d221d7de99b51470355a82 100644 (file)
@@ -99,6 +99,10 @@ void * aes_encrypt_init(const u8 *key, size_t len)
 {
        u32 *rk;
        int res;
+
+       if (TEST_FAIL())
+               return NULL;
+
        rk = os_malloc(AES_PRIV_SIZE);
        if (rk == NULL)
                return NULL;