* destest.c, random_key.c, string2key.c, verify.c : Remove krb5_enctype
authorChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 03:29:17 +0000 (03:29 +0000)
committerChris Provenzano <proven@mit.edu>
Wed, 6 Sep 1995 03:29:17 +0000 (03:29 +0000)
references, and replace with krb5_keytype where appropriate.
* init_rkey.c (mit_des_init_random_key()),
* string2key.c (mit_des_string_to_key()) : Allow for any DES keytype.

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

src/lib/crypto/des/ChangeLog
src/lib/crypto/des/destest.c
src/lib/crypto/des/init_rkey.c
src/lib/crypto/des/random_key.c
src/lib/crypto/des/string2key.c
src/lib/crypto/des/verify.c

index d2d40e81efde61527f63002f4fafbada94afc68a..b36a526eb588fc5ebd63e651f521fe205e5a2829 100644 (file)
@@ -1,4 +1,12 @@
 
+Tue Sep 05 22:10:34 1995   Chris Provenzano (proven@mit.edu)
+
+        * destest.c, random_key.c, string2key.c, verify.c : Remove krb5_enctype
+               references, and replace with krb5_keytype where appropriate.
+       * init_rkey.c (mit_des_init_random_key()), 
+       * string2key.c (mit_des_string_to_key()) : Allow for any DES keytype.
+
+
 Tue Aug 29 13:29:19 EDT 1995   Paul Park       (pjpark@mit.edu)
        * process_key.c, finish_key.c - Set and use priv_size in the krb5_
                encrypt_block.
index 0132fa2fe848cbebb3c7623459e9496f9794d235..c4b320e49b90ad48b1efe847e504683b1f289be0 100644 (file)
@@ -58,10 +58,9 @@ char *argv[];
     /* do some initialisation */
     initialize_krb5_error_table();
 
-    krb5_use_cstype(context, &eblock, ETYPE_DES_CBC_CRC);
+    krb5_use_keytype(context, &eblock, KEYTYPE_DES_CBC_CRC);
     keyblock.magic = KV5M_KEYBLOCK;
-    keyblock.etype = ETYPE_DES_CBC_CRC;
-    keyblock.keytype = KEYTYPE_DES;
+    keyblock.keytype = KEYTYPE_DES_CBC_CRC;
     keyblock.length = sizeof (mit_des_cblock);
     keyblock.contents = (krb5_octet *)key;
 
index c240b9dce53bbf962d383756eedbd8d7b893d95e..441de6418d37abee1377eb0811bf6e7be7504e3e 100644 (file)
@@ -38,7 +38,10 @@ mit_des_init_random_key (seedblock, seed)
     krb5_pointer * seed;
 {
     mit_des_random_key_seed * p_seed;
-    if (seedblock->keytype != KEYTYPE_DES)
+    if ((seedblock->keytype != KEYTYPE_DES_CBC_CRC) &&
+       (seedblock->keytype != KEYTYPE_DES_CBC_MD4) && 
+       (seedblock->keytype != KEYTYPE_DES_CBC_MD5) && 
+       (seedblock->keytype != KEYTYPE_DES_CBC_RAW))
        return KRB5_BAD_KEYTYPE;
     if ( !(p_seed = (mit_des_random_key_seed *) 
           malloc(sizeof(mit_des_random_key_seed))) ) 
index bf5f60a6d86add6ea513f772fd4f458f421b0e06..563751769dc19d5162cc71537c93cd81a8d428cf 100644 (file)
@@ -44,9 +44,8 @@ mit_des_random_key (eblock, seed, keyblock)
        return ENOMEM;
     }
     randkey->magic = KV5M_KEYBLOCK;
-    randkey->etype = eblock->crypto_entry->proto_enctype;
     randkey->length = sizeof(mit_des_cblock);
-    randkey->keytype = KEYTYPE_DES;
+    randkey->keytype = eblock->crypto_entry->proto_keytype;
     mit_des_new_random_key(randkey->contents, (mit_des_random_key_seed *) seed);
     *keyblock = randkey;
     return 0;
index 166db5f48ea1e065e759839618678252ed77c115..c20f2be9d417ba9555ae0c20a3292ea7ca657857 100644 (file)
@@ -65,16 +65,16 @@ const krb5_data FAR * salt;
 #define min(A, B) ((A) < (B) ? (A): (B))
 #endif
 
-    if ( keytype != KEYTYPE_DES )
+    if ((keytype != KEYTYPE_DES_CBC_CRC) && (keytype != KEYTYPE_DES_CBC_MD4) &&
+       (keytype != KEYTYPE_DES_CBC_MD5) && (keytype != KEYTYPE_DES_CBC_RAW)) 
        return (KRB5_PROG_KEYTYPE_NOSUPP);
 
     if ( !(keyblock->contents = (krb5_octet *)malloc(sizeof(mit_des_cblock))) )
        return(ENOMEM);
 
     keyblock->magic = KV5M_KEYBLOCK;
-    keyblock->etype = eblock->crypto_entry->proto_enctype;
-    keyblock->keytype = KEYTYPE_DES;
     keyblock->length = sizeof(mit_des_cblock);
+    keyblock->keytype = eblock->crypto_entry->proto_keytype;
     key = keyblock->contents;
 
     if (salt)
index 117d188042b7ab98fa156817e5551e01b7e8147b..1953ac57fcd3cbf9afae34b6e23b837677cdb6d1 100644 (file)
@@ -148,9 +148,9 @@ main(argc,argv)
     /* do some initialisation */
     initialize_krb5_error_table(); 
 
-    krb5_use_cstype(context, &eblock, ETYPE_DES_CBC_CRC);
-    keyblock.keytype = KEYTYPE_DES;
-    keyblock.length = sizeof (mit_des_cblock);
+    krb5_use_keytype(context, &eblock, KEYTYPE_DES_CBC_CRC);
+    keyblock.keytype = KEYTYPE_DES_CBC_CRC;
+    keyblock.length = sizeof(mit_des_cblock);
 
     /* use known input and key */