mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Fix for new random seed crypto callback to properly reset error code in NOT_COMPILED_IN case.
This commit is contained in:
@ -2176,11 +2176,13 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
||||
int ret = 0;
|
||||
|
||||
#ifdef WOLF_CRYPTO_CB
|
||||
if (os != NULL && os->devId != INVALID_DEVID) {
|
||||
ret = wc_CryptoCb_RandomSeed(os, output, sz);
|
||||
if (ret != NOT_COMPILED_IN)
|
||||
return ret;
|
||||
}
|
||||
if (os != NULL && os->devId != INVALID_DEVID) {
|
||||
ret = wc_CryptoCb_RandomSeed(os, output, sz);
|
||||
if (ret != NOT_COMPILED_IN)
|
||||
return ret;
|
||||
/* fall-through on not compiled in */
|
||||
ret = 0; /* reset error code */
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_INTEL_RDSEED
|
||||
|
Reference in New Issue
Block a user