mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 01:40:48 +02:00
fix F-5958: wc_linuxkm_drbg_generate returns untranslated wolfCrypt RNG_FAILURE_E on the slen>0 reseed-failure path
This commit is contained in:
@@ -1230,10 +1230,16 @@ static int wc_linuxkm_drbg_generate(struct wc_rng_bank *ctx,
|
|||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (unlikely(ret == WC_NO_ERR_TRACE(RNG_FAILURE_E)) && (! retried)) {
|
if (unlikely(ret == WC_NO_ERR_TRACE(RNG_FAILURE_E))) {
|
||||||
if (slen > 0)
|
if (slen > 0) {
|
||||||
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (retried) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
retried = 1;
|
retried = 1;
|
||||||
|
|
||||||
ret = wc_rng_bank_inst_reinit(ctx,
|
ret = wc_rng_bank_inst_reinit(ctx,
|
||||||
|
|||||||
Reference in New Issue
Block a user