diff options
author | 2017-02-17 02:32:05 +0000 | |
---|---|---|
committer | 2017-02-17 02:32:05 +0000 | |
commit | 8643c0d8e38e10ff3742dac6fd2df6eaa88ffd1a (patch) | |
tree | ffdc4cdd229d86484be4dffd741cce8c39ff84f3 /usr.bin/ssh/ssh-keygen.c | |
parent | ifdef out "rsa1" from the list of supported keytypes when compiled without (diff) | |
download | wireguard-openbsd-8643c0d8e38e10ff3742dac6fd2df6eaa88ffd1a.tar.xz wireguard-openbsd-8643c0d8e38e10ff3742dac6fd2df6eaa88ffd1a.zip |
Do not show rsa1 key type in usage when compiled without SSH1 support.
Diffstat (limited to 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 2d8cfaf010a..dd2e79b5714 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.294 2017/02/10 03:36:40 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.295 2017/02/17 02:32:05 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -2194,11 +2194,17 @@ do_check_krl(struct passwd *pw, int argc, char **argv) } #endif +#ifdef WITH_SSH1 +# define RSA1_USAGE " | rsa1" +#else +# define RSA1_USAGE "" +#endif + static void usage(void) { fprintf(stderr, - "usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]\n" + "usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa%s]\n" " [-N new_passphrase] [-C comment] [-f output_keyfile]\n" " ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]\n" " ssh-keygen -i [-m key_format] [-f input_keyfile]\n" @@ -2206,7 +2212,7 @@ usage(void) " ssh-keygen -y [-f input_keyfile]\n" " ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]\n" " ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile]\n" - " ssh-keygen -B [-f input_keyfile]\n"); + " ssh-keygen -B [-f input_keyfile]\n", RSA1_USAGE); #ifdef ENABLE_PKCS11 fprintf(stderr, " ssh-keygen -D pkcs11\n"); |