diff options
Diffstat (limited to 'eBones/krb/mk_priv.c')
-rw-r--r-- | eBones/krb/mk_priv.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/eBones/krb/mk_priv.c b/eBones/krb/mk_priv.c index bc377de..d45d734 100644 --- a/eBones/krb/mk_priv.c +++ b/eBones/krb/mk_priv.c @@ -40,8 +40,13 @@ static char rcsid[] = #include <prot.h> #include "lsb_addr_comp.h" +extern char *errmsg(); +extern int errno; +extern int krb_debug; + /* static storage */ + static u_long c_length; static struct timeval msg_time; static u_char msg_time_5ms; @@ -90,9 +95,16 @@ static long msg_time_sec; * 0<=n<=7 bytes pad to 8 byte multiple zeroes */ -long krb_mk_priv(u_char *in, u_char *out, u_long length, - des_key_schedule schedule, des_cblock key, struct sockaddr_in *sender, - struct sockaddr_in *receiver) +long krb_mk_priv(in,out,length,schedule,key,sender,receiver) + u_char *in; /* application data */ + u_char *out; /* put msg here, leave room for + * header! breaks if in and out + * (header stuff) overlap */ + u_long length; /* of in data */ + Key_schedule schedule; /* precomputed key schedule */ + C_Block key; /* encryption key for seed and ivec */ + struct sockaddr_in *sender; /* sender address */ + struct sockaddr_in *receiver; /* receiver address */ { register u_char *p,*q; static u_char *c_length_ptr; @@ -187,8 +199,8 @@ long krb_mk_priv(u_char *in, u_char *out, u_long length, bcopy((char *) &c_length,(char *)c_length_ptr,sizeof(c_length)); #ifndef NOENCRYPTION - pcbc_encrypt((des_cblock *)q,(des_cblock *)q,(long)(p-q),schedule, - (des_cblock *)key,ENCRYPT); + pcbc_encrypt((C_Block *)q,(C_Block *)q,(long)(p-q),schedule,(C_Block *)key, + ENCRYPT); #endif /* NOENCRYPTION */ return (q - out + c_length); /* resulting size */ |