=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rlogin/Attic/des_rw.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/rlogin/Attic/des_rw.c 1995/10/18 08:46:00 1.1 --- src/usr.bin/rlogin/Attic/des_rw.c 1995/12/16 22:20:31 1.2 *************** *** 41,47 **** #endif #endif /* not lint */ - #ifdef CRYPT #ifdef KERBEROS #include --- 41,46 ---- *************** *** 53,61 **** #include #include ! static unsigned char des_inbuf[10240], storage[10240], *store_ptr; ! static bit_64 *key; ! static u_char *key_schedule; /* XXX these should be in a kerberos include file */ int krb_net_read __P((int, char *, int)); --- 52,60 ---- #include #include ! static des_cblock des_inbuf[10240], storage[10240], *store_ptr; ! static des_cblock *key; ! static des_key_schedule key_schedule; /* XXX these should be in a kerberos include file */ int krb_net_read __P((int, char *, int)); *************** *** 80,92 **** * and the insched is the DES Key unwrapped for faster decryption */ ! void des_set_key(inkey, insched) ! bit_64 *inkey; ! u_char *insched; { key = inkey; ! key_schedule = insched; } void --- 79,93 ---- * and the insched is the DES Key unwrapped for faster decryption */ ! int des_set_key(inkey, insched) ! des_cblock *inkey; ! des_key_schedule insched; { key = inkey; ! bcopy(insched, key_schedule, sizeof(key_schedule)); ! ! return 0; } void *************** *** 166,172 **** return(nreturned); } ! static unsigned char des_outbuf[10240]; /* > longest write */ int des_write(fd, buf, len) --- 167,173 ---- return(nreturned); } ! static des_cblock des_outbuf[10240]; /* > longest write */ int des_write(fd, buf, len) *************** *** 175,181 **** int len; { static int seeded = 0; ! static char garbage_buf[8]; long net_len, garbage; if(len < 8) { --- 176,182 ---- int len; { static int seeded = 0; ! static des_cblock garbage_buf[8]; long net_len, garbage; if(len < 8) { *************** *** 191,197 **** } /* pcbc_encrypt outputs in 8-byte (64 bit) increments */ ! (void) des_pcbc_encrypt((len < 8) ? garbage_buf : buf, des_outbuf, (len < 8) ? 8 : len, key_schedule, /* DES key */ --- 192,198 ---- } /* pcbc_encrypt outputs in 8-byte (64 bit) increments */ ! (void) des_pcbc_encrypt((len < 8) ? garbage_buf : (des_cblock *)buf, des_outbuf, (len < 8) ? 8 : len, key_schedule, /* DES key */ *************** *** 206,209 **** return(len); } #endif /* KERBEROS */ - #endif /* CRYPT */ --- 207,209 ----