summaryrefslogtreecommitdiff
path: root/usr.bin/skey/skey.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-09-29 04:34:09 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-09-29 04:34:09 +0000
commitf91240ebe9961cf7fc65e477b9941ea61779def3 (patch)
treef436bd99096cfc5f358fde55ddecb782e13f9be5 /usr.bin/skey/skey.c
parent90a215b6ee18989d45636fed99d295353c8a34a8 (diff)
Added support for MD4/MD5 as an argument.
Diffstat (limited to 'usr.bin/skey/skey.c')
-rw-r--r--usr.bin/skey/skey.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/usr.bin/skey/skey.c b/usr.bin/skey/skey.c
index 4baa7c39a32..81752f84938 100644
--- a/usr.bin/skey/skey.c
+++ b/usr.bin/skey/skey.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: skey.c,v 1.3 1996/09/27 15:41:36 millert Exp $*/
+/* * $OpenBSD: skey.c,v 1.4 1996/09/29 04:33:58 millert Exp $*/
/*
* S/KEY v1.1b (skey.c)
*
@@ -59,8 +59,18 @@ main(argc, argv)
}
}
- /* could be in the form <number>/<seed> */
+ /* check for md4/md5 argument */
+ if (argv[optind]) {
+ if (strcmp(argv[optind], "MD4") == 0) {
+ skey_set_MDX(4);
+ optind++;
+ } else if (strcmp(argv[optind], "MD5") == 0) {
+ skey_set_MDX(5);
+ optind++;
+ }
+ }
+ /* could be in the form <number>/<seed> */
if (argc <= optind + 1) {
/* look for / in it */
if (argc <= optind)
@@ -118,6 +128,6 @@ void
usage(s)
char *s;
{
- (void)fprintf(stderr, "Usage: %s [-x] [-4|-5] [-n count] [-p password ] sequence# [/] key", s);
+ (void)fprintf(stderr, "Usage: %s [-x] [-4|-5] [-n count] [-p password] [MD4|MD5] sequence# [/] key", s);
exit(1);
}