mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-21 13:59:40 +00:00
Check length of additional input in DRBG generate function.
This commit is contained in:
parent
de2132de93
commit
361d18a208
@ -377,6 +377,12 @@ int FIPS_drbg_generate(DRBG_CTX *dctx, unsigned char *out, size_t outlen,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (adinlen > dctx->max_adin)
|
||||||
|
{
|
||||||
|
r = FIPS_R_ADDITIONAL_INPUT_TOO_LONG;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
if (dctx->flags & DRBG_CUSTOM_RESEED)
|
if (dctx->flags & DRBG_CUSTOM_RESEED)
|
||||||
dctx->generate(dctx, NULL, outlen, NULL, 0);
|
dctx->generate(dctx, NULL, outlen, NULL, 0);
|
||||||
else if (dctx->reseed_counter >= dctx->reseed_interval)
|
else if (dctx->reseed_counter >= dctx->reseed_interval)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user