From 4b2e03c42af69684665b53b3b7a51a82622aa3b5 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Tue, 8 May 2018 09:26:45 +1000 Subject: [PATCH] wolfSSL: DH initialization to call TEST_FAIL() for error tests Signed-off-by: Sean Parkinson --- src/crypto/crypto_wolfssl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c index 1d9ebee70..bc4fd6a2a 100644 --- a/src/crypto/crypto_wolfssl.c +++ b/src/crypto/crypto_wolfssl.c @@ -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;