diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2017-02-17 02:32:05 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-02-17 14:52:24 +1100 |
commit | 3baa4cdd197c95d972ec3d07f1c0d08f2d7d9199 (patch) | |
tree | 35f3b942de02b36954f76979656897f4cf76a107 | |
parent | ecc35893715f969e98fee118481f404772de4132 (diff) |
upstream commit
Do not show rsa1 key type in usage when compiled without
SSH1 support.
Upstream-ID: 068b5c41357a02f319957746fa4e84ea73960f57
-rw-r--r-- | ssh-keygen.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 5e9f0879b..33d405a0d 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.294 2017/02/10 03:36:40 djm Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.295 2017/02/17 02:32:05 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -2208,11 +2208,17 @@ do_check_krl(struct passwd *pw, int argc, char **argv) | |||
2208 | exit(ret); | 2208 | exit(ret); |
2209 | } | 2209 | } |
2210 | 2210 | ||
2211 | #ifdef WITH_SSH1 | ||
2212 | # define RSA1_USAGE " | rsa1" | ||
2213 | #else | ||
2214 | # define RSA1_USAGE "" | ||
2215 | #endif | ||
2216 | |||
2211 | static void | 2217 | static void |
2212 | usage(void) | 2218 | usage(void) |
2213 | { | 2219 | { |
2214 | fprintf(stderr, | 2220 | fprintf(stderr, |
2215 | "usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]\n" | 2221 | "usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa%s]\n" |
2216 | " [-N new_passphrase] [-C comment] [-f output_keyfile]\n" | 2222 | " [-N new_passphrase] [-C comment] [-f output_keyfile]\n" |
2217 | " ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]\n" | 2223 | " ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]\n" |
2218 | " ssh-keygen -i [-m key_format] [-f input_keyfile]\n" | 2224 | " ssh-keygen -i [-m key_format] [-f input_keyfile]\n" |
@@ -2220,7 +2226,7 @@ usage(void) | |||
2220 | " ssh-keygen -y [-f input_keyfile]\n" | 2226 | " ssh-keygen -y [-f input_keyfile]\n" |
2221 | " ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]\n" | 2227 | " ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]\n" |
2222 | " ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile]\n" | 2228 | " ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile]\n" |
2223 | " ssh-keygen -B [-f input_keyfile]\n"); | 2229 | " ssh-keygen -B [-f input_keyfile]\n", RSA1_USAGE); |
2224 | #ifdef ENABLE_PKCS11 | 2230 | #ifdef ENABLE_PKCS11 |
2225 | fprintf(stderr, | 2231 | fprintf(stderr, |
2226 | " ssh-keygen -D pkcs11\n"); | 2232 | " ssh-keygen -D pkcs11\n"); |