]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wolfSSL: DH initialization to call TEST_FAIL() for error tests
authorSean Parkinson <sean@wolfssl.com>
Mon, 7 May 2018 23:26:45 +0000 (09:26 +1000)
committerJouni Malinen <j@w1.fi>
Thu, 17 May 2018 17:08:22 +0000 (20:08 +0300)
Signed-off-by: Sean Parkinson <sean@wolfssl.com>
src/crypto/crypto_wolfssl.c

index 1d9ebee7041022e640a53f2829d73d5963d75e0a..bc4fd6a2a57b55e3ca588a404e974dd241c3dbbf 100644 (file)
@@ -783,6 +783,9 @@ int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey,
        DhKey *dh = NULL;
        word32 priv_sz, pub_sz;
 
+       if (TEST_FAIL())
+               return -1;
+
        dh = os_malloc(sizeof(DhKey));
        if (!dh)
                return -1;