krb5/crypto: Fix a couple of places where return codes weren't

The recent iovec changes introduced a couple of places where return
codes were being incorrectly discarded. Fix them so errors get back
to callers.
This commit is contained in:
Simon Wilkinson
2018-05-25 23:13:52 +01:00
committed by Jeffrey Altman
parent e5b6a3390a
commit f0bc313cef

View File

@@ -331,6 +331,8 @@ _krb5_SP_HMAC_SHA1_checksum(krb5_context context,
ret = _krb5_evp_hmac_iov(context, crypto, key, iov, niov, hmac, &hmaclen,
EVP_sha1(), NULL);
if (ret)
return ret;
heim_assert(result->checksum.length <= hmaclen,
"SHA1 checksum too short");
@@ -1994,10 +1996,10 @@ krb5_create_checksum_iov(krb5_context context,
ret = create_checksum_iov(context, ct, crypto, keyusage,
data, num_data, &cksum);
if (type)
if (ret == 0 && type)
*type = cksum.cksumtype;
return 0;
return ret;
}
/**