HMAC: use EVP_MD_flags(), not EVP_MD_meth_get_flags()

The latter should only be ussed with legacy methods.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9391)
This commit is contained in:
Richard Levitte 2019-07-24 22:19:37 +02:00
parent f1d3df3e69
commit 5acb2be58b

View file

@ -39,7 +39,7 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
* The HMAC construction is not allowed to be used with the * The HMAC construction is not allowed to be used with the
* extendable-output functions (XOF) shake128 and shake256. * extendable-output functions (XOF) shake128 and shake256.
*/ */
if ((EVP_MD_meth_get_flags(md) & EVP_MD_FLAG_XOF) != 0) if ((EVP_MD_flags(md) & EVP_MD_FLAG_XOF) != 0)
return 0; return 0;
if (key != NULL) { if (key != NULL) {