summaryrefslogtreecommitdiffstats
path: root/eBones/lib/libkrb/create_ciph.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1995-09-07 21:39:00 +0000
committermarkm <markm@FreeBSD.org>1995-09-07 21:39:00 +0000
commit2539acf77b018acd7416a9857a14c466e55cd7e8 (patch)
tree96ff3578d62372822240f11a1567e45b880f3910 /eBones/lib/libkrb/create_ciph.c
parenteed9438eb23b62f78af7685dc226228e2bf5c524 (diff)
downloadFreeBSD-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/create_ciph.c')
-rw-r--r--eBones/lib/libkrb/create_ciph.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/eBones/lib/libkrb/create_ciph.c b/eBones/lib/libkrb/create_ciph.c
index a383604..7fb93e3 100644
--- a/eBones/lib/libkrb/create_ciph.c
+++ b/eBones/lib/libkrb/create_ciph.c
@@ -56,9 +56,19 @@ static char *rcsid =
*
*/
-int create_ciph(KTEXT c, des_cblock session, char *service, char *instance,
- char *realm, unsigned long life, int kvno, KTEXT tkt,
- unsigned long kdc_time, des_cblock key)
+int
+create_ciph(c, session, service, instance, realm, life, kvno, tkt,
+ kdc_time, key)
+ KTEXT c; /* Text block to hold ciphertext */
+ C_Block session; /* Session key to send to user */
+ char *service; /* Service name on ticket */
+ char *instance; /* Instance name on ticket */
+ char *realm; /* Realm of this KDC */
+ unsigned long life; /* Lifetime of the ticket */
+ int kvno; /* Key version number for service */
+ KTEXT tkt; /* The ticket for the service */
+ unsigned long kdc_time; /* KDC time */
+ C_Block key; /* Key to encrypt ciphertext with */
{
char *ptr;
Key_schedule key_s;
@@ -93,9 +103,9 @@ int create_ciph(KTEXT c, des_cblock session, char *service, char *instance,
c->length = (((ptr - (char *) c->dat) + 7) / 8) * 8;
#ifndef NOENCRYPTION
- key_sched((des_cblock *)key,key_s);
- pcbc_encrypt((des_cblock *)c->dat,(des_cblock *)c->dat,(long) c->length,
- key_s,(des_cblock *)key,ENCRYPT);
+ key_sched((C_Block *)key,key_s);
+ pcbc_encrypt((C_Block *)c->dat,(C_Block *)c->dat,(long) c->length,key_s,
+ (C_Block *)key,ENCRYPT);
#endif /* NOENCRYPTION */
return(KSUCCESS);
OpenPOWER on IntegriCloud