summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/krb
diff options
context:
space:
mode:
authorLuke Howard <lukeh@padl.com>2010-09-09 15:39:47 +0000
committerLuke Howard <lukeh@padl.com>2010-09-09 15:39:47 +0000
commitc766c773504c863467cee30543e06093093d6f1a (patch)
tree288641df7fbd945ad0501eaf13a8738f7fea5d30 /src/lib/crypto/krb
parentb1a7985e4b3bbd76cf2f4c332fe100f0e3b2d801 (diff)
downloadkrb5-c766c773504c863467cee30543e06093093d6f1a.tar.gz
krb5-c766c773504c863467cee30543e06093093d6f1a.tar.xz
krb5-c766c773504c863467cee30543e06093093d6f1a.zip
krb5_k_make_checksum will use the mandatory checksum type if 0 is
passed in as the checksum type; however krb5_k_make_checksum_iov does not support this. Add the same logic for the behaviour is consistent. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24303 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/krb')
-rw-r--r--src/lib/crypto/krb/make_checksum_iov.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/crypto/krb/make_checksum_iov.c b/src/lib/crypto/krb/make_checksum_iov.c
index dcffa489c..a7a3cb3dd 100644
--- a/src/lib/crypto/krb/make_checksum_iov.c
+++ b/src/lib/crypto/krb/make_checksum_iov.c
@@ -42,6 +42,12 @@ krb5_k_make_checksum_iov(krb5_context context,
krb5_crypto_iov *checksum;
const struct krb5_cksumtypes *ctp;
+ if (cksumtype == 0) {
+ ret = krb5int_c_mandatory_cksumtype(context, key->keyblock.enctype,
+ &cksumtype);
+ if (ret != 0)
+ return ret;
+ }
ctp = find_cksumtype(cksumtype);
if (ctp == NULL)
return KRB5_BAD_ENCTYPE;