File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -26041,11 +26041,25 @@ int wolfSSL_RAND_poll(void)
26041
26041
return WOLFSSL_FAILURE;
26042
26042
}
26043
26043
ret = wc_GenerateSeed(&globalRNG.seed, entropy, entropy_sz);
26044
- if (ret != 0){
26044
+ if (ret != 0) {
26045
26045
WOLFSSL_MSG("Bad wc_RNG_GenerateBlock");
26046
26046
ret = WOLFSSL_FAILURE;
26047
- }else
26048
- ret = WOLFSSL_SUCCESS;
26047
+ }
26048
+ else {
26049
+ #ifdef HAVE_HASHDRBG
26050
+ ret = wc_RNG_DRBG_Reseed(&globalRNG, entropy, entropy_sz);
26051
+ if (ret != 0) {
26052
+ WOLFSSL_MSG("Error reseeding DRBG");
26053
+ ret = WOLFSSL_FAILURE;
26054
+ }
26055
+ else {
26056
+ ret = WOLFSSL_SUCCESS;
26057
+ }
26058
+ #else
26059
+ WOLFSSL_MSG("RAND_poll called with HAVE_HASHDRBG not set");
26060
+ ret = WOLFSSL_FAILURE;
26061
+ #endif
26062
+ }
26049
26063
26050
26064
return ret;
26051
26065
}
You can’t perform that action at this time.
0 commit comments