summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuke Howard <lukeh@padl.com>2010-09-09 15:54:32 +0000
committerLuke Howard <lukeh@padl.com>2010-09-09 15:54:32 +0000
commit4aa174a66adb5c20932c7c6d154baf894ea22c95 (patch)
tree6eeaea68d621b1c89dad99aed553bb2276243b90 /src
parentc766c773504c863467cee30543e06093093d6f1a (diff)
downloadkrb5-4aa174a66adb5c20932c7c6d154baf894ea22c95.tar.gz
krb5-4aa174a66adb5c20932c7c6d154baf894ea22c95.tar.xz
krb5-4aa174a66adb5c20932c7c6d154baf894ea22c95.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/crypto/krb/verify_checksum_iov.c6
1 files changed, 6 insertions, 0 deletions
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;