all des enctypes are equivalent (interim checkin until I create a function
authorRichard Basch <probe@mit.edu>
Fri, 22 Mar 1996 04:53:25 +0000 (04:53 +0000)
committerRichard Basch <probe@mit.edu>
Fri, 22 Mar 1996 04:53:25 +0000 (04:53 +0000)
to check the key equivalency of two enctypes).

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7701 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/keytab/file/ChangeLog
src/lib/krb5/keytab/file/ktf_g_ent.c

index 006f194b4173b8de9479ca761fc7f224d9a523d7..385e254c898478b02905214947fd3548c28cfc1b 100644 (file)
@@ -1,3 +1,7 @@
+Tue Mar 19 22:28:43 1996  Richard Basch  <basch@lehman.com>
+
+       * ktf_g_ent.c (krb5_ktfile_get_entry): all des enctypes are equivalent
+
 Thu Jan 25 15:52:34 1996  Sam Hartman  <hartmans@tertius.mit.edu>
 
        * ktf_g_ent.c (krb5_ktfile_get_entry): Match against enctype.
index e0688336e944b574f349c238a2e15e906448d85f..9a76ce4cdae3bbddc54526059a41109c34932fa5 100644 (file)
@@ -53,11 +53,32 @@ krb5_ktfile_get_entry(context, id, principal, kvno, enctype, entry)
     cur_entry.vno = 0;
     cur_entry.key.contents = 0;
     while (TRUE) {
+       krb5_enctype entry_type;
+       
        if ((kerror = krb5_ktfileint_read_entry(context, id, &new_entry)))
            break;
 
-       if (((enctype  == IGNORE_ENCTYPE)||
-           (new_entry.key.enctype  == enctype))&&
+       switch (enctype) {
+       case ENCTYPE_DES_CBC_CRC:
+       case ENCTYPE_DES_CBC_MD5:
+       case ENCTYPE_DES_CBC_MD4:
+       case ENCTYPE_DES_CBC_RAW:
+           enctype = ENCTYPE_DES_CBC_CRC;
+           break;
+       }
+
+       entry_type = new_entry.key.enctype;
+       switch(entry_type) {
+       case ENCTYPE_DES_CBC_CRC:
+       case ENCTYPE_DES_CBC_MD5:
+       case ENCTYPE_DES_CBC_MD4:
+       case ENCTYPE_DES_CBC_RAW:
+           entry_type = ENCTYPE_DES_CBC_CRC;
+           break;
+       }
+
+       if (((enctype == IGNORE_ENCTYPE)||
+           (entry_type == enctype))&&
            krb5_principal_compare(context, principal, new_entry.principal)) {
                if (kvno == IGNORE_VNO) {
                        if (cur_entry.vno < new_entry.vno) {