pull up r23629 from trunk
authorTom Yu <tlyu@mit.edu>
Tue, 12 Jan 2010 04:44:29 +0000 (04:44 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 12 Jan 2010 04:44:29 +0000 (04:44 +0000)
 ------------------------------------------------------------------------
 r23629 | ghudson | 2010-01-11 20:07:48 -0500 (Mon, 11 Jan 2010) | 9 lines

 ticket: 6633
 subject: Use keyed checksum type for DES FAST
 target_version: 1.7
 tags: pullup

 DES enctypes have unkeyed mandatory-to-implement checksums.  Since
 FAST requires a keyed checksum, we must pick something else in that
 case.

ticket: 6633
version_fixed: 1.7.1
status: resolved

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-7@23646 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/fast.c

index ef57e6d832f4128099e090079b9bc3d15aa8a8ce..5231065fef2aed0a7b52cc2f2697fef76790c28b 100644 (file)
@@ -209,6 +209,9 @@ krb5int_fast_prep_req (krb5_context context, struct krb5int_fast_request_state *
     if (retval == 0)
        retval = krb5int_c_mandatory_cksumtype(context, state->armor_key->enctype,
                                               &cksumtype);
+    /* DES enctypes have unkeyed mandatory checksums; need a keyed one. */
+    if (retval == 0 && !krb5_c_is_keyed_cksum(cksumtype))
+       cksumtype = CKSUMTYPE_RSA_MD5_DES;
     if (retval ==0)
        retval = krb5_c_make_checksum(context, cksumtype, state->armor_key,
                                      KRB5_KEYUSAGE_FAST_REQ_CHKSUM, to_be_checksummed,