summaryrefslogtreecommitdiff
path: root/usr.bin/skeyinit
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2014-03-20 20:39:14 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2014-03-20 20:39:14 +0000
commit550a28377381fac97a531ba75a0f61753df88db4 (patch)
treec5f9dd538271861af1364f86d035c1e2318769f4 /usr.bin/skeyinit
parente5fe6de7f1b3f5d61599dcb1cbbb2d02d8277b27 (diff)
Remove the (non-default) MD4 hash algorithm from S/Key.
ok millert, man pages ok jmc@
Diffstat (limited to 'usr.bin/skeyinit')
-rw-r--r--usr.bin/skeyinit/skeyinit.110
-rw-r--r--usr.bin/skeyinit/skeyinit.c15
2 files changed, 12 insertions, 13 deletions
diff --git a/usr.bin/skeyinit/skeyinit.1 b/usr.bin/skeyinit/skeyinit.1
index 4e976e3314a..ef8af4c0ae4 100644
--- a/usr.bin/skeyinit/skeyinit.1
+++ b/usr.bin/skeyinit/skeyinit.1
@@ -1,8 +1,8 @@
-.\" $OpenBSD: skeyinit.1,v 1.36 2014/02/12 16:58:44 schwarze Exp $
+.\" $OpenBSD: skeyinit.1,v 1.37 2014/03/20 20:39:13 naddy Exp $
.\" $NetBSD: skeyinit.1,v 1.4 1995/07/07 22:24:09 jtc Exp $
.\" @(#)skeyinit.1 1.1 10/28/93
.\"
-.Dd $Mdocdate: February 12 2014 $
+.Dd $Mdocdate: March 20 2014 $
.Dt SKEYINIT 1
.Os
.Sh NAME
@@ -14,7 +14,7 @@
.Op Fl CDErsx
.Op Fl a Ar auth-type
.Op Fl n Ar count
-.Op Fl md4 | md5 | rmd160 | sha1
+.Op Fl md5 | rmd160 | sha1
.Op Ar user
.Ek
.Sh DESCRIPTION
@@ -91,9 +91,9 @@ Enables access to the S/Key database.
Only the superuser may use the
.Fl E
option.
-.It Fl md4 | md5 | rmd160 | sha1
+.It Fl md5 | rmd160 | sha1
Selects the hash algorithm:
-MD4, MD5, RMD-160 (160-bit Ripe Message Digest),
+MD5, RMD-160 (160-bit Ripe Message Digest),
or SHA1 (NIST Secure Hash Algorithm Revision 1).
.It Fl n Ar count
Start the
diff --git a/usr.bin/skeyinit/skeyinit.c b/usr.bin/skeyinit/skeyinit.c
index af5a91db982..9a20ddb5d91 100644
--- a/usr.bin/skeyinit/skeyinit.c
+++ b/usr.bin/skeyinit/skeyinit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: skeyinit.c,v 1.52 2013/11/28 18:24:55 deraadt Exp $ */
+/* $OpenBSD: skeyinit.c,v 1.53 2014/03/20 20:39:13 naddy Exp $ */
/* OpenBSD S/Key (skeyinit.c)
*
@@ -513,12 +513,11 @@ convert_db(void)
continue;
if ((cp = strtok(NULL, " \t")) == NULL)
continue;
- if (isalpha((unsigned char)*cp)) {
- hashtype = cp;
- if ((cp = strtok(NULL, " \t")) == NULL)
- continue;
- } else
- hashtype = "md4";
+ if (!isalpha((unsigned char)*cp))
+ continue;
+ hashtype = cp;
+ if ((cp = strtok(NULL, " \t")) == NULL)
+ continue;
n = atoi(cp);
if ((seed = strtok(NULL, " \t")) == NULL)
continue;
@@ -559,6 +558,6 @@ usage(void)
extern char *__progname;
(void)fprintf(stderr, "usage: %s [-CDErsx] [-a auth-type] [-n count]"
- "\n\t[-md4 | -md5 | -rmd160 | -sha1] [user]\n", __progname);
+ "\n\t[-md5 | -rmd160 | -sha1] [user]\n", __progname);
exit(1);
}