krb5: Expand list of vector types that are hashed

So that we can eventually use iovec hashes with encrypt, as well
as sign operations, add CRYPTO_TYPE_HEADER and CRYPTO_TYPE_PADDING
to the list of iovecs which will be hashed.
This commit is contained in:
Simon Wilkinson
2018-05-14 14:46:09 +01:00
committed by Jeffrey Altman
parent 2d84fc65bb
commit 550067f6d0
2 changed files with 7 additions and 2 deletions

View File

@@ -186,7 +186,9 @@ static inline int
_krb5_crypto_iov_should_sign(const struct krb5_crypto_iov *iov)
{
return (iov->flags == KRB5_CRYPTO_TYPE_DATA
|| iov->flags == KRB5_CRYPTO_TYPE_SIGN_ONLY);
|| iov->flags == KRB5_CRYPTO_TYPE_SIGN_ONLY
|| iov->flags == KRB5_CRYPTO_TYPE_HEADER
|| iov->flags == KRB5_CRYPTO_TYPE_PADDING);
}
/* NO_HCRYPTO_POLLUTION is defined in pkinit-ec.c. See commentary there. */