forked from wolfSSL/wolfssl
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;
|
int ret = 0;
|
||||||
|
|
||||||
#ifdef WOLF_CRYPTO_CB
|
#ifdef WOLF_CRYPTO_CB
|
||||||
if (os != NULL && os->devId != INVALID_DEVID) {
|
if (os != NULL && os->devId != INVALID_DEVID) {
|
||||||
ret = wc_CryptoCb_RandomSeed(os, output, sz);
|
ret = wc_CryptoCb_RandomSeed(os, output, sz);
|
||||||
if (ret != NOT_COMPILED_IN)
|
if (ret != NOT_COMPILED_IN)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
/* fall-through on not compiled in */
|
||||||
|
ret = 0; /* reset error code */
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_INTEL_RDSEED
|
#ifdef HAVE_INTEL_RDSEED
|
||||||
|
Reference in New Issue
Block a user