summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-11-11 05:59:48 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-11-11 05:59:48 +0000
commit27790fd1fffb50b152926a4ba9ec57c20bd13bcd (patch)
tree63e99c2e55a624eb31063ec5ec504ce73e0f2081
parentf40379aeb7a08ee6452da352c31176294c295e21 (diff)
type casts
-rw-r--r--usr.bin/rlogin/des_rw.c20
-rw-r--r--usr.bin/rlogin/krcmd.c6
-rw-r--r--usr.bin/rlogin/rlogin.c9
3 files changed, 18 insertions, 17 deletions
diff --git a/usr.bin/rlogin/des_rw.c b/usr.bin/rlogin/des_rw.c
index 3e635967d76..2033979824f 100644
--- a/usr.bin/rlogin/des_rw.c
+++ b/usr.bin/rlogin/des_rw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: des_rw.c,v 1.4 1996/06/26 05:38:30 deraadt Exp $ */
+/* $OpenBSD: des_rw.c,v 1.5 1996/11/11 05:59:44 mickey Exp $ */
/* $NetBSD: des_rw.c,v 1.2 1995/03/21 07:58:30 cgd Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)des_rw.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: des_rw.c,v 1.4 1996/06/26 05:38:30 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: des_rw.c,v 1.5 1996/11/11 05:59:44 mickey Exp $";
#endif
#endif /* not lint */
@@ -54,8 +54,8 @@ static char rcsid[] = "$OpenBSD: des_rw.c,v 1.4 1996/06/26 05:38:30 deraadt Exp
#include <unistd.h>
static unsigned char des_inbuf[10240], storage[10240], *store_ptr;
-static bit_64 *key;
-static u_char *key_schedule;
+static des_cblock *key;
+static des_key_schedule *key_schedule;
/*
* NB: These routines will not function properly if NBIO
@@ -75,8 +75,8 @@ static int nstored = 0;
void
desrw_set_key(inkey, insched)
- bit_64 *inkey;
- u_char *insched;
+ des_cblock *inkey;
+ des_key_schedule*insched;
{
key = inkey;
key_schedule = insched;
@@ -135,8 +135,8 @@ des_read(fd, buf, len)
(void) des_pcbc_encrypt((des_cblock *)des_inbuf, /* inbuf */
(des_cblock *)storage, /* outbuf */
rd_len, /* length */
- key_schedule, /* DES key */
- (des_cblock *)key, /* IV */
+ *key_schedule, /* DES key */
+ key, /* IV */
DECRYPT); /* direction */
if(net_len < 8)
@@ -187,8 +187,8 @@ des_write(fd, buf, len)
(void) des_pcbc_encrypt((des_cblock *)((len < 8) ? garbage_buf : buf),
(des_cblock *)des_outbuf,
(len < 8) ? 8 : len,
- key_schedule, /* DES key */
- (des_cblock *)key, /* IV */
+ *key_schedule, /* DES key */
+ key, /* IV */
ENCRYPT);
/* tell the other end the real amount, but send an 8-byte padded
diff --git a/usr.bin/rlogin/krcmd.c b/usr.bin/rlogin/krcmd.c
index b5dfb3c3388..532b31b1819 100644
--- a/usr.bin/rlogin/krcmd.c
+++ b/usr.bin/rlogin/krcmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: krcmd.c,v 1.5 1996/08/11 19:19:58 tholo Exp $ */
+/* $OpenBSD: krcmd.c,v 1.6 1996/11/11 05:59:46 mickey Exp $ */
/* $NetBSD: krcmd.c,v 1.2 1995/03/21 07:58:36 cgd Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)krcmd.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: krcmd.c,v 1.5 1996/08/11 19:19:58 tholo Exp $";
+static char rcsid[] = "$OpenBSD: krcmd.c,v 1.6 1996/11/11 05:59:46 mickey Exp $";
#endif
#endif /* not lint */
@@ -95,7 +95,7 @@ krcmd(ahost, rport, remuser, cmd, fd2p, realm)
SERVICE_NAME,
realm,
(CREDENTIALS *) NULL, /* credentials not used */
- (bit_64 *) NULL, /* key schedule not used */
+ (void *) NULL, /* key schedule not used */
(MSG_DAT *) NULL, /* MSG_DAT not used */
(struct sockaddr_in *) NULL, /* local addr not used */
(struct sockaddr_in *) NULL, /* foreign addr not used */
diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c
index b6d7ed98023..f782110a046 100644
--- a/usr.bin/rlogin/rlogin.c
+++ b/usr.bin/rlogin/rlogin.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlogin.c,v 1.8 1996/08/11 19:20:01 tholo Exp $ */
+/* $OpenBSD: rlogin.c,v 1.9 1996/11/11 05:59:47 mickey Exp $ */
/* $NetBSD: rlogin.c,v 1.8 1995/10/05 09:07:22 mycroft Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)rlogin.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: rlogin.c,v 1.8 1996/08/11 19:20:01 tholo Exp $";
+static char rcsid[] = "$OpenBSD: rlogin.c,v 1.9 1996/11/11 05:59:47 mickey Exp $";
#endif
#endif /* not lint */
@@ -85,7 +85,7 @@ static char rcsid[] = "$OpenBSD: rlogin.c,v 1.8 1996/08/11 19:20:01 tholo Exp $"
#include <kerberosIV/krb.h>
CREDENTIALS cred;
-Key_schedule schedule;
+des_key_schedule schedule;
int use_kerberos = 1, doencrypt;
char dst_realm_buf[REALM_SZ], *dest_realm = NULL;
#endif
@@ -140,6 +140,7 @@ void writeroob __P((int));
#ifdef KERBEROS
void warning __P((const char *, ...));
+void desrw_set_key __P((des_cblock *, des_key_schedule *));
#endif
#ifdef OLDSUN
int get_window_size __P((int, struct winsize *));
@@ -214,7 +215,7 @@ main(argc, argv)
#ifdef KERBEROS
case 'x':
doencrypt = 1;
- desrw_set_key(&cred.session, schedule);
+ desrw_set_key(&cred.session, &schedule);
break;
#endif
case '?':