diff options
Diffstat (limited to 'providers/implementations/rands/drbg_hash.c')
-rw-r--r-- | providers/implementations/rands/drbg_hash.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/providers/implementations/rands/drbg_hash.c b/providers/implementations/rands/drbg_hash.c index 12faa993d0..0761b403da 100644 --- a/providers/implementations/rands/drbg_hash.c +++ b/providers/implementations/rands/drbg_hash.c @@ -466,10 +466,8 @@ static int drbg_hash_set_ctx_params(void *vctx, const OSSL_PARAM params[]) md = ossl_prov_digest_md(&hash->digest); if (md != NULL) { - if ((EVP_MD_get_flags(md) & EVP_MD_FLAG_XOF) != 0) { - ERR_raise(ERR_LIB_PROV, PROV_R_XOF_DIGESTS_NOT_ALLOWED); - return 0; - } + if (!ossl_drbg_verify_digest(libctx, md)) + return 0; /* Error already raised for us */ /* These are taken from SP 800-90 10.1 Table 2 */ hash->blocklen = EVP_MD_get_size(md); |