summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/skey/skey.110
-rw-r--r--usr.bin/skey/skey.c19
2 files changed, 15 insertions, 14 deletions
diff --git a/usr.bin/skey/skey.1 b/usr.bin/skey/skey.1
index c6b232f6278..55135264f6e 100644
--- a/usr.bin/skey/skey.1
+++ b/usr.bin/skey/skey.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: skey.1,v 1.21 2000/11/09 17:52:38 aaron Exp $
+.\" $OpenBSD: skey.1,v 1.22 2001/06/20 17:12:29 millert Exp $
.\" @(#)skey.1 1.1 10/28/93
.\"
.Dd October 28, 1993
@@ -18,7 +18,7 @@
.Op Fl p Ar passwd
<sequence#>[/] key
.Sh DESCRIPTION
-.Nm S/key
+.Nm S/Key
is a procedure for using one-time passwords to authenticate access to
computer systems.
It uses 64 bits of information transformed by the
@@ -26,8 +26,8 @@ MD4, MD5, SHA1, or RIPEMD-160 algorithms.
The user supplies the 64 bits
in the form of 6 English words that are generated by a secure computer.
This implementation of
-.Nm s/key
-is RFC 1938 compliant.
+.Nm S/Key
+is RFC 2289 compliant.
.Pp
When
.Nm skey
@@ -88,7 +88,7 @@ Selects RMD-160 (160 bit Ripe Message Digest) as the hash algorithm.
.Xr skeyinfo 1 ,
.Xr skeyinit 1
.Pp
-.Em RFC1938
+.Em RFC2289
.Sh TRADEMARKS AND PATENTS
S/Key is a Trademark of Bellcore.
.Sh AUTHORS
diff --git a/usr.bin/skey/skey.c b/usr.bin/skey/skey.c
index 986dc9fbf8a..7832a8ba7c4 100644
--- a/usr.bin/skey/skey.c
+++ b/usr.bin/skey/skey.c
@@ -1,12 +1,13 @@
-/* * $OpenBSD: skey.c,v 1.14 1999/12/04 21:27:18 deraadt Exp $*/
+/* $OpenBSD: skey.c,v 1.15 2001/06/20 17:12:30 millert Exp $ */
/*
- * S/KEY v1.1b (skey.c)
+ * OpenBSD S/Key (skey.c)
*
* Authors:
* Neil M. Haller <nmh@thumper.bellcore.com>
* Philip R. Karn <karn@chicago.qualcomm.com>
* John S. Walden <jsw@thumper.bellcore.com>
* Scott Chasin <chasin@crimelab.com>
+ * Todd C. Miller <Todd.Miller@courtesan.com>
*
*
* Stand-alone program for computing responses to S/Key challenges.
@@ -41,9 +42,9 @@ main(argc, argv)
/* If we were called as otp-METHOD, set algorithm based on that */
if ((slash = strrchr(argv[0], '/')))
- slash++;
+ slash++;
else
- slash = argv[0];
+ slash = argv[0];
if (strncmp(slash, "otp-", 4) == 0) {
slash += 4;
if (skey_set_algorithm(slash) == NULL)
@@ -55,14 +56,14 @@ main(argc, argv)
/* Single character switch */
switch (argv[i][1]) {
case 'n':
- if (i + 1 == argc)
+ if (++i == argc)
usage(argv[0]);
- cnt = atoi(argv[++i]);
+ cnt = atoi(argv[i]);
break;
case 'p':
- if (i + 1 == argc)
+ if (++i == argc)
usage(argv[0]);
- if (strlcpy(passwd, argv[++i], sizeof(passwd)) >=
+ if (strlcpy(passwd, argv[i], sizeof(passwd)) >=
sizeof(passwd))
errx(1, "Password too long");
pass = 1;
@@ -149,7 +150,7 @@ main(argc, argv)
void
usage(s)
- char *s;
+ char *s;
{
(void)fprintf(stderr, "Usage: %s [-x] [-md4|-md5|-sha1|-rmd160] [-n count] [-p password] <sequence#>[/] key\n", s);
exit(1);