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

lhoward@MIT.EDU lhoward at MIT.EDU
Thu Sep 9 11:54:33 EDT 2010


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



Changed Files:
U   trunk/src/lib/crypto/krb/verify_checksum_iov.c
Modified: trunk/src/lib/crypto/krb/verify_checksum_iov.c
===================================================================
--- trunk/src/lib/crypto/krb/verify_checksum_iov.c	2010-09-09 15:39:47 UTC (rev 24303)
+++ trunk/src/lib/crypto/krb/verify_checksum_iov.c	2010-09-09 15:54:32 UTC (rev 24304)
@@ -43,6 +43,12 @@
     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;




More information about the cvs-krb5 mailing list