From ff963e7259afedd904e4260b46b61fa8cecbf141 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Thu, 16 Sep 2021 14:08:12 -0700 Subject: [PATCH] fall back to previous version if PRF not compiled in --- src/ssl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index 18f25387f..73ee22bbe 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -57869,6 +57869,7 @@ int wolfSSL_RAND_pseudo_bytes(unsigned char* buf, int num) } #endif +#ifdef WOLFSSL_HAVE_PRF #ifndef NO_SHA256 hash = WC_SHA256; #elif defined(WOLFSSL_SHA384) @@ -57888,7 +57889,12 @@ int wolfSSL_RAND_pseudo_bytes(unsigned char* buf, int num) hash, NULL, INVALID_DEVID); ret = (ret == 0) ? WOLFSSL_SUCCESS: WOLFSSL_FAILURE; } - +#else + /* fall back to just doing wolfSSL_RAND_bytes if PRF not avialbale */ + ret = wolfSSL_RAND_bytes(buf, num); + (void)hash; + (void)secret; +#endif return ret; }