summaryrefslogtreecommitdiffstats
path: root/eBones/lib/libkrb/create_ciph.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1995-08-25 22:52:32 +0000
committermarkm <markm@FreeBSD.org>1995-08-25 22:52:32 +0000
commita83b802bada404e3b2eccf92c3499966deaad171 (patch)
tree45f2ba147600b7d47d9e9695cf572877c7fa4773 /eBones/lib/libkrb/create_ciph.c
parent2d8492d7c86b21502ee9277e20ef1e6e931b7c44 (diff)
downloadFreeBSD-src-a83b802bada404e3b2eccf92c3499966deaad171.zip
FreeBSD-src-a83b802bada404e3b2eccf92c3499966deaad171.tar.gz
Start the eBones cleanup ball rolling.
These are the start of a lot of work to clean up the FreeBSD eBones code. these changes include, but are not limited to: - Create prototypes for all the library routines - Make all the libraries compile clean with -Wall set - Fix numerous small bugs shown up in the above process - Prepare the code for libdes's removal to secure/ - add register, registerd and make_keypair to the make Lots more will follow in days to come. OK'ed by: rgrimes
Diffstat (limited to 'eBones/lib/libkrb/create_ciph.c')
-rw-r--r--eBones/lib/libkrb/create_ciph.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/eBones/lib/libkrb/create_ciph.c b/eBones/lib/libkrb/create_ciph.c
index 634d371..a383604 100644
--- a/eBones/lib/libkrb/create_ciph.c
+++ b/eBones/lib/libkrb/create_ciph.c
@@ -5,13 +5,15 @@
* <Copyright.MIT>.
*
* from: create_ciph.c,v 4.8 89/05/18 21:24:26 jis Exp $
- * $Id: create_ciph.c,v 1.1.1.1 1994/09/30 14:49:59 csgr Exp $
+ * $Id: create_ciph.c,v 1.3 1995/07/18 16:38:07 mark Exp $
*/
+#if 0
#ifndef lint
static char *rcsid =
-"$Id: create_ciph.c,v 1.1.1.1 1994/09/30 14:49:59 csgr Exp $";
+"$Id: create_ciph.c,v 1.3 1995/07/18 16:38:07 mark Exp $";
#endif /* lint */
+#endif
#include <krb.h>
#include <des.h>
@@ -54,18 +56,9 @@ static char *rcsid =
*
*/
-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 */
+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)
{
char *ptr;
Key_schedule key_s;
@@ -100,9 +93,9 @@ create_ciph(c, session, service, instance, realm, life, kvno, tkt,
c->length = (((ptr - (char *) c->dat) + 7) / 8) * 8;
#ifndef NOENCRYPTION
- key_sched(key,key_s);
- pcbc_encrypt((C_Block *)c->dat,(C_Block *)c->dat,(long) c->length,key_s,
- key,ENCRYPT);
+ 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);
#endif /* NOENCRYPTION */
return(KSUCCESS);
OpenPOWER on IntegriCloud