Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10321)
@@ -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)
+
drbg->meth = &drbg_hmac_meth;
if (hmac->ctx == NULL) {