From: Jouni Malinen Date: Sat, 16 Mar 2019 16:45:51 +0000 (+0200) Subject: Add TEST_FAIL() to aes_encrypt_init() with internal crypto X-Git-Tag: hostap_2_8~197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=808bdb308f71f742309c96628df3471a3704f00f;p=thirdparty%2Fhostap.git Add TEST_FAIL() to aes_encrypt_init() with internal crypto This is needed for the hwsim test cases ap_wpa2_eap_psk_oom and ap_wpa2_eap_sim_oom. Signed-off-by: Jouni Malinen --- diff --git a/src/crypto/aes-internal-enc.c b/src/crypto/aes-internal-enc.c index 9fdb4f35c..baeffcaf6 100644 --- a/src/crypto/aes-internal-enc.c +++ b/src/crypto/aes-internal-enc.c @@ -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;