svn rev #24303: trunk/src/lib/crypto/krb/

lhoward@MIT.EDU lhoward at MIT.EDU
Thu Sep 9 11:39:47 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24303
Commit By: lhoward
Log Message:
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.



Changed Files:
U   trunk/src/lib/crypto/krb/make_checksum_iov.c
Modified: trunk/src/lib/crypto/krb/make_checksum_iov.c
===================================================================
--- trunk/src/lib/crypto/krb/make_checksum_iov.c	2010-09-08 19:01:02 UTC (rev 24302)
+++ trunk/src/lib/crypto/krb/make_checksum_iov.c	2010-09-09 15:39:47 UTC (rev 24303)
@@ -42,6 +42,12 @@
     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;




More information about the cvs-krb5 mailing list