diff options
author | markm <markm@FreeBSD.org> | 2001-12-02 12:17:20 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2001-12-02 12:17:20 +0000 |
commit | 8e33fb69fc45f4bb7cc91a88fc201e074c9eeaf9 (patch) | |
tree | 0594b64fc835c9a5bbf6575836f47c0ac1a1051c /usr.bin/newkey/generic.c | |
parent | a59a3a99ce709ed0944f5b38c6fc98d2be49eb9c (diff) | |
download | FreeBSD-src-8e33fb69fc45f4bb7cc91a88fc201e074c9eeaf9.zip FreeBSD-src-8e33fb69fc45f4bb7cc91a88fc201e074c9eeaf9.tar.gz |
WARNS=2 fixup.
Turn on YP (NIS) while I'm about it.
Diffstat (limited to 'usr.bin/newkey/generic.c')
-rw-r--r-- | usr.bin/newkey/generic.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/usr.bin/newkey/generic.c b/usr.bin/newkey/generic.c index 39e40f0..223dcf4 100644 --- a/usr.bin/newkey/generic.c +++ b/usr.bin/newkey/generic.c @@ -39,18 +39,22 @@ static const char rcsid[] = * Copyright (C) 1986, Sun Microsystems, Inc. */ -#include <stdio.h> -#include <stdlib.h> -#include <rpc/rpc.h> #include <sys/file.h> -#include <mp.h> +#include <rpc/rpc.h> #include <rpc/key_prot.h> +#include <mp.h> +#include <stdio.h> +#include <stdlib.h> + +#include "extern.h" + +static void adjust __P((char[], char *)); +static void getseed __P((char *, int, unsigned char *)); -static int adjust __P(( char[], char * )); /* * Generate a seed */ -static +static void getseed(seed, seedsize, pass) char *seed; int seedsize; @@ -66,12 +70,13 @@ getseed(seed, seedsize, pass) /* * Generate a random public/secret key pair */ +void genkeys(public, secret, pass) char *public; char *secret; char *pass; { - int i; + unsigned int i; # define BASEBITS (8*sizeof (short) - 1) # define BASE (1 << BASEBITS) @@ -112,7 +117,7 @@ genkeys(public, secret, pass) /* * Adjust the input key so that it is 0-filled on the left */ -static +static void adjust(keyout, keyin) char keyout[HEXKEYBYTES+1]; char *keyin; |