From 4aa174a66adb5c20932c7c6d154baf894ea22c95 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Thu, 9 Sep 2010 15:54:32 +0000 Subject: [PATCH] Allow a zero checksum type to be passed into krb5_k_verify_checksum_iov; this indicates that the mandatory checksum type for the key is to be used. This interface is necessary because there is no public interface through which the mandatory checksum type for an encryption type can be determined. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24304 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/krb/verify_checksum_iov.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/crypto/krb/verify_checksum_iov.c b/src/lib/crypto/krb/verify_checksum_iov.c index 0934ae511..d5427baec 100644 --- a/src/lib/crypto/krb/verify_checksum_iov.c +++ b/src/lib/crypto/krb/verify_checksum_iov.c @@ -43,6 +43,12 @@ krb5_k_verify_checksum_iov(krb5_context context, krb5_data computed; krb5_crypto_iov *checksum; + if (checksum_type == 0) { + ret = krb5int_c_mandatory_cksumtype(context, key->keyblock.enctype, + &checksum_type); + if (ret != 0) + return ret; + } ctp = find_cksumtype(checksum_type); if (ctp == NULL) return KRB5_BAD_ENCTYPE; -- 2.26.2