DRBG: add check for XOF so these can be disallowed by the DRBGs
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10321)
This commit is contained in:
parent
9fff0a4b0d
commit
5d0cf102e0
2 changed files with 5 additions and 0 deletions
|
@ -317,6 +317,8 @@ int drbg_hash_init(RAND_DRBG *drbg)
|
|||
if (md == NULL)
|
||||
return 0;
|
||||
|
||||
if ((EVP_MD_flags(md) & EVP_MD_FLAG_XOF) != 0)
|
||||
return 0;
|
||||
|
||||
drbg->meth = &drbg_hash_meth;
|
||||
|
||||
|
|
|
@ -211,6 +211,9 @@ int drbg_hmac_init(RAND_DRBG *drbg)
|
|||
if (md == NULL)
|
||||
return 0;
|
||||
|
||||
if ((EVP_MD_flags(md) & EVP_MD_FLAG_XOF) != 0)
|
||||
return 0;
|
||||
|
||||
drbg->meth = &drbg_hmac_meth;
|
||||
|
||||
if (hmac->ctx == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue