diff options
author | markm <markm@FreeBSD.org> | 1995-09-07 21:39:00 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 1995-09-07 21:39:00 +0000 |
commit | 2539acf77b018acd7416a9857a14c466e55cd7e8 (patch) | |
tree | 96ff3578d62372822240f11a1567e45b880f3910 /eBones/lib/libkrb/rd_priv.c | |
parent | eed9438eb23b62f78af7685dc226228e2bf5c524 (diff) | |
download | FreeBSD-src-2539acf77b018acd7416a9857a14c466e55cd7e8.zip FreeBSD-src-2539acf77b018acd7416a9857a14c466e55cd7e8.tar.gz |
Major cleanup of eBones code:
- Get all functions prototyped or at least defined before use.
- Make code compile (Mostly) clean with -Wall set
- Start to reduce the degree to which DES aka libdes is built in.
- get all functions to the same uniform standard of definition:
int
foo(a, b)
int a;
int *b;
{
:
}
- fix numerous bugs exposed by above processes.
Note - this replaces the previous work which used an unpopular function
definition style.
Diffstat (limited to 'eBones/lib/libkrb/rd_priv.c')
-rw-r--r-- | eBones/lib/libkrb/rd_priv.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/eBones/lib/libkrb/rd_priv.c b/eBones/lib/libkrb/rd_priv.c index 457352e..0c21a1d 100644 --- a/eBones/lib/libkrb/rd_priv.c +++ b/eBones/lib/libkrb/rd_priv.c @@ -26,8 +26,8 @@ static char rcsid[]= #endif /* system include files */ -#include <stdio.h> #include <string.h> +#include <stdio.h> #include <errno.h> #include <sys/types.h> #include <netinet/in.h> @@ -39,6 +39,8 @@ static char rcsid[]= #include <prot.h> #include "lsb_addr_comp.h" +extern int krb_debug; + /* static storage */ static u_long c_length; @@ -68,9 +70,15 @@ int private_msg_ver = KRB_PROT_VERSION; * information, MSG_DAT, is defined in "krb.h". */ -long krb_rd_priv(u_char *in, u_long in_length, des_key_schedule schedule, - des_cblock key, struct sockaddr_in *sender, struct sockaddr_in *receiver, - MSG_DAT *m_data) +long +krb_rd_priv(in,in_length,schedule,key,sender,receiver,m_data) + u_char *in; /* pointer to the msg received */ + u_long in_length; /* length of "in" msg */ + Key_schedule schedule; /* precomputed key schedule */ + C_Block key; /* encryption key for seed and ivec */ + struct sockaddr_in *sender; + struct sockaddr_in *receiver; + MSG_DAT *m_data; /*various input/output data from msg */ { register u_char *p,*q; static u_long src_addr; /* Can't send structs since no @@ -103,8 +111,8 @@ long krb_rd_priv(u_char *in, u_long in_length, des_key_schedule schedule, q = p; /* mark start of encrypted stuff */ #ifndef NOENCRYPTION - pcbc_encrypt((des_cblock *)q,(des_cblock *)q,(long)c_length,schedule, - (des_cblock *)key,DECRYPT); + pcbc_encrypt((C_Block *)q,(C_Block *)q,(long)c_length,schedule, + (C_Block *)key,DECRYPT); #endif /* safely get application data length */ |