Changes in des425 due to adding prototypes for called functions
authorKeith Vetter <keithv@fusion.com>
Wed, 15 Mar 1995 22:21:50 +0000 (22:21 +0000)
committerKeith Vetter <keithv@fusion.com>
Wed, 15 Mar 1995 22:21:50 +0000 (22:21 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5129 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/des425/ChangeLog
src/lib/des425/des.h
src/lib/des425/enc_dec.c
src/lib/des425/key_sched.c
src/lib/des425/new_rnd_key.c
src/lib/des425/random_key.c

index 529fbed4bdefd784c38ad1ece44e9146fa9ff22f..4d17a235035bc8e428aa9f08118a0dd74da51413 100644 (file)
@@ -1,8 +1,20 @@
+Wed Mar 15 13:44:23 1995 Keith Vetter (keithv@fusion.com)
+
+       * des.h: now includes des_int.h for proper prototypes.
+       * enc_dec.c: cast the types of the input/output buffers in calling
+           the encrypt routine.
+       * key_sched.c: removed prototype of a non-existent routine.
+       * new_rnd_key.c: removed prototypes in the file and instead include
+           header file with the real prototypes.
+       * random_key.c: code, as it was, could never have worked. Adding 
+           prototypes revealed that it was passing KEY with the wrong level
+           of indirection.
+        
 Tue Mar 7 19:57:28 1995 Keith Vetter (keithv@fusion.com)
 
        * pcbc_enc.c: added casts on the long->char assignments.
         * str_to_key.c: converted int->long to match types.
-       * read_passwd.c: converted int->long.
+
 
 Wed Mar  8 17:13:44 1995  Theodore Y. Ts'o  <tytso@dcl>
 
index 893f2503ffb6f5a3d168aa3b3090e753eba5b01e..9bd6885eab1eee29dd2280a0ead1571ee82e7c2a 100644 (file)
@@ -32,6 +32,7 @@
 #define DES_DEFS
 
 #include "k5-int.h"
+#include "des_int.h"
 
 typedef mit_des_cblock des_cblock;     /* crypto-block size */
 
index 90de9253a26c81ceb66a6f9154981e8466597830..cf6bfc8a01def88859430bd4e18b8b3818728428 100644 (file)
@@ -66,6 +66,8 @@ des_cbc_encrypt(in,out,length,key,iv,encrypt)
     krb5_octet *iv;            /* 8 bytes of ivec */
     int encrypt;               /* 0 ==> decrypt, else encrypt */
 {
-       return(mit_des_cbc_encrypt(in,out,length,key,iv,encrypt));
+       return (mit_des_cbc_encrypt((const des_cblock *) in,
+                                (des_cblock *) out,
+                                length, key, iv, encrypt));
 }
 
index c801f1344785c16aba55c1fe02a832b30e6062f1..96c7d4984e6e56edd87199a2074d16612abe518f 100644 (file)
 #include <stdio.h>
 #include "des.h"
 
-typedef char key[64];
-
-/* the following are really void but cc86 doesnt allow it */
-static void make_key_sched PROTOTYPE((key, mit_des_key_schedule));
-
 int INTERFACE
 des_key_sched(k,schedule)
     register mit_des_cblock k; /* r11 */
index 3ade2ce133ce9a8335e8b55f32ab49492decb443..5e4d5aa3bcbb7b676fd54c22b7bfab2cfe5b45a0 100644 (file)
 
 #include "des.h"
 
-extern int INTERFACE mit_des_init_random_number_generator();
-extern void INTERFACE mit_des_set_random_generator_seed();
-extern void INTERFACE mit_des_set_sequence_number();
-extern void INTERFACE mit_des_generate_random_block();
-extern int INTERFACE mit_des_new_random_key();
-
-
-void INTERFACE des_set_random_generator_seed();
-void INTERFACE des_set_sequence_number();
-void INTERFACE des_generate_random_block();
-
 /*
  * The secret des key schedule and sequence number for the current
  * stream of random numbers
index 498f8848d149d70fd616331e12ff485c94789d27..945e20f40d1afc1d7e958b2110ef60f4d330ab55 100644 (file)
@@ -35,12 +35,12 @@ des_random_key(key)
     mit_des_cblock             nullkey;
 
     memset(nullkey, 0, sizeof(mit_des_cblock));
-    mit_des_fixup_key_parity(key);
+    mit_des_fixup_key_parity(*key);
     mit_des_init_random_number_generator(nullkey,&p_seed);
     do {
-       mit_des_generate_random_block(key, &p_seed);
-       mit_des_fixup_key_parity(key);
-    } while (mit_des_is_weak_key(key));
+       mit_des_generate_random_block(*key, &p_seed);
+       mit_des_fixup_key_parity(*key);
+    } while (mit_des_is_weak_key(*key));
 
     return(0);
 }