forked from wolfSSL/wolfssl
Fixes for building with WC_NO_RNG
.
This commit is contained in:
@ -510,6 +510,7 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
|
||||
else {
|
||||
err_sys("wc_InitRng failed");
|
||||
}
|
||||
(void)rng; /* for WC_NO_RNG case */
|
||||
}
|
||||
else {
|
||||
err_sys("Client buffer malloc failed");
|
||||
|
@ -20611,6 +20611,9 @@ static int test_wc_RNG_GenerateBlock(void)
|
||||
|
||||
wc_FreeRng(&rng);
|
||||
|
||||
(void)rng; /* for WC_NO_RNG case */
|
||||
(void)key;
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -2858,6 +2858,7 @@ static WC_INLINE const char* mymktemp(char *tempfn, int len, int num)
|
||||
tempfn[len] = '\0';
|
||||
|
||||
wc_FreeRng(&rng);
|
||||
(void)rng; /* for WC_NO_RNG case */
|
||||
|
||||
return tempfn;
|
||||
}
|
||||
@ -2973,6 +2974,7 @@ static WC_INLINE word16 GetRandomPort(void)
|
||||
port |= 0xC000; /* Make sure its in the 49152 - 65535 range */
|
||||
wc_FreeRng(&rng);
|
||||
}
|
||||
(void)rng; /* for WC_NO_RNG case */
|
||||
return port;
|
||||
}
|
||||
|
||||
|
@ -188,6 +188,7 @@ WOLFSSL_API int wc_RNG_GenerateBlock(WC_RNG*, byte*, word32 sz);
|
||||
WOLFSSL_API int wc_RNG_GenerateByte(WC_RNG*, byte*);
|
||||
WOLFSSL_API int wc_FreeRng(WC_RNG*);
|
||||
#else
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#define wc_InitRng(rng) NOT_COMPILED_IN
|
||||
#define wc_InitRng_ex(rng, h, d) NOT_COMPILED_IN
|
||||
#define wc_InitRngNonce(rng, n, s) NOT_COMPILED_IN
|
||||
|
Reference in New Issue
Block a user