aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto/aes-internal-enc.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-03-16 16:45:51 (GMT)
committerJouni Malinen <j@w1.fi>2019-03-16 16:52:09 (GMT)
commit808bdb308f71f742309c96628df3471a3704f00f (patch)
treeb995e65ff1a03b32279a5094654870c18b8ad032 /src/crypto/aes-internal-enc.c
parent32f4760664c53db6312a425e73bac41d1e88f366 (diff)
downloadhostap-808bdb308f71f742309c96628df3471a3704f00f.zip
hostap-808bdb308f71f742309c96628df3471a3704f00f.tar.gz
hostap-808bdb308f71f742309c96628df3471a3704f00f.tar.bz2
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 <j@w1.fi>
Diffstat (limited to 'src/crypto/aes-internal-enc.c')
-rw-r--r--src/crypto/aes-internal-enc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/crypto/aes-internal-enc.c b/src/crypto/aes-internal-enc.c
index 9fdb4f3..baeffca 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;