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 @@ -26053,11 +26053,25 @@ int wolfSSL_RAND_poll(void)
2605326053 return WOLFSSL_FAILURE;
2605426054 }
2605526055 ret = wc_GenerateSeed(&globalRNG.seed, entropy, entropy_sz);
26056- if (ret != 0){
26056+ if (ret != 0) {
2605726057 WOLFSSL_MSG("Bad wc_RNG_GenerateBlock");
2605826058 ret = WOLFSSL_FAILURE;
26059- }else
26060- ret = WOLFSSL_SUCCESS;
26059+ }
26060+ else {
26061+ #ifdef HAVE_HASHDRBG
26062+ ret = wc_RNG_DRBG_Reseed(&globalRNG, entropy, entropy_sz);
26063+ if (ret != 0) {
26064+ WOLFSSL_MSG("Error reseeding DRBG");
26065+ ret = WOLFSSL_FAILURE;
26066+ }
26067+ else {
26068+ ret = WOLFSSL_SUCCESS;
26069+ }
26070+ #else
26071+ WOLFSSL_MSG("RAND_poll called with HAVE_HASHDRBG not set");
26072+ ret = WOLFSSL_FAILURE;
26073+ #endif
26074+ }
2606126075
2606226076 return ret;
2606326077}
You can’t perform that action at this time.
0 commit comments