From 6918974405cc28ed977f802fd97a9c9a9b2e141b Mon Sep 17 00:00:00 2001 From: "jmc@openbsd.org" Date: Thu, 3 Oct 2019 17:07:50 +0000 Subject: [PATCH] upstream: use a more common options order in SYNOPSIS and sync usage(); while here, no need for Bk/Ek; ok dtucker OpenBSD-Commit-ID: 38715c3f10b166f599a2283eb7bc14860211bb90 --- ssh-keygen.1 | 34 ++++++++++++++++------------------ ssh-keygen.c | 34 +++++++++++++++++----------------- 2 files changed, 33 insertions(+), 35 deletions(-) diff --git a/ssh-keygen.1 b/ssh-keygen.1 index 637dd4231..957d2f0f0 100644 --- a/ssh-keygen.1 +++ b/ssh-keygen.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-keygen.1,v 1.170 2019/09/29 16:31:57 jmc Exp $ +.\" $OpenBSD: ssh-keygen.1,v 1.171 2019/10/03 17:07:50 jmc Exp $ .\" .\" Author: Tatu Ylonen .\" Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -35,44 +35,43 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: September 29 2019 $ +.Dd $Mdocdate: October 3 2019 $ .Dt SSH-KEYGEN 1 .Os .Sh NAME .Nm ssh-keygen .Nd authentication key generation, management and conversion .Sh SYNOPSIS -.Bk -words .Nm ssh-keygen .Op Fl q .Op Fl b Ar bits -.Op Fl t Cm dsa | ecdsa | ed25519 | rsa -.Op Fl N Ar new_passphrase .Op Fl C Ar comment .Op Fl f Ar output_keyfile .Op Fl m Ar format +.Op Fl N Ar new_passphrase +.Op Fl t Cm dsa | ecdsa | ed25519 | rsa .Nm ssh-keygen .Fl p -.Op Fl P Ar old_passphrase -.Op Fl N Ar new_passphrase .Op Fl f Ar keyfile .Op Fl m Ar format +.Op Fl N Ar new_passphrase +.Op Fl P Ar old_passphrase .Nm ssh-keygen .Fl i -.Op Fl m Ar key_format .Op Fl f Ar input_keyfile +.Op Fl m Ar key_format .Nm ssh-keygen .Fl e -.Op Fl m Ar key_format .Op Fl f Ar input_keyfile +.Op Fl m Ar key_format .Nm ssh-keygen .Fl y .Op Fl f Ar input_keyfile .Nm ssh-keygen .Fl c -.Op Fl P Ar passphrase .Op Fl C Ar comment .Op Fl f Ar keyfile +.Op Fl P Ar passphrase .Nm ssh-keygen .Fl l .Op Fl v @@ -104,8 +103,8 @@ .Op Fl M Ar memory .Op Fl S Ar start_point .Nm ssh-keygen -.Fl T Ar output_file .Fl f Ar input_file +.Fl T Ar output_file .Op Fl v .Op Fl a Ar rounds .Op Fl J Ar num_lines @@ -113,8 +112,8 @@ .Op Fl K Ar checkpt .Op Fl W Ar generator .Nm ssh-keygen -.Fl s Ar ca_key .Fl I Ar certificate_identity +.Fl s Ar ca_key .Op Fl hU .Op Fl D Ar pkcs11_provider .Op Fl n Ar principals @@ -140,22 +139,21 @@ .Fl f Ar krl_file .Ar .Nm ssh-keygen +.Fl Y Cm check-novalidate +.Fl n Ar namespace +.Fl s Ar signature_file +.Nm ssh-keygen .Fl Y Cm sign .Fl f Ar key_file .Fl n Ar namespace .Ar .Nm ssh-keygen .Fl Y Cm verify -.Fl I Ar signer_identity .Fl f Ar allowed_signers_file +.Fl I Ar signer_identity .Fl n Ar namespace .Fl s Ar signature_file .Op Fl r Ar revocation_file -.Nm ssh-keygen -.Fl Y Cm check-novalidate -.Fl s Ar signature_file -.Fl n Ar namespace -.Ek .Sh DESCRIPTION .Nm generates, manages and converts authentication keys for diff --git a/ssh-keygen.c b/ssh-keygen.c index e039be304..85fb4424f 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.354 2019/10/02 09:50:50 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.355 2019/10/03 17:07:50 jmc Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -2708,14 +2708,14 @@ static void usage(void) { fprintf(stderr, - "usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa] [-m format]\n" - " [-N new_passphrase] [-C comment] [-f output_keyfile]\n" - " ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-m format]\n" - " [-f keyfile]\n" - " ssh-keygen -i [-m key_format] [-f input_keyfile]\n" - " ssh-keygen -e [-m key_format] [-f input_keyfile]\n" + "usage: ssh-keygen [-q] [-b bits] [-C comment] [-f output_keyfile] [-m format]\n" + " [-N new_passphrase] [-t dsa | ecdsa | ed25519 | rsa]\n" + " ssh-keygen -p [-f keyfile] [-m format] [-N new_passphrase]\n" + " [-P old_passphrase]\n" + " ssh-keygen -i [-f input_keyfile] [-m key_format]\n" + " ssh-keygen -e [-f input_keyfile] [-m key_format]\n" " ssh-keygen -y [-f input_keyfile]\n" - " ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]\n" + " ssh-keygen -c [-C comment] [-f keyfile] [-P passphrase]\n" " ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile]\n" " ssh-keygen -B [-f input_keyfile]\n"); #ifdef ENABLE_PKCS11 @@ -2729,21 +2729,21 @@ usage(void) " ssh-keygen -r hostname [-g] [-f input_keyfile]\n" #ifdef WITH_OPENSSL " ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]\n" - " ssh-keygen -T output_file -f input_file [-v] [-a rounds] [-J num_lines]\n" + " ssh-keygen -f input_file -T output_file [-v] [-a rounds] [-J num_lines]\n" " [-j start_line] [-K checkpt] [-W generator]\n" #endif - " ssh-keygen -s ca_key -I certificate_identity [-hU]\n" - " [-D pkcs11_provider] [-n principals] [-O option]\n" - " [-V validity_interval] [-z serial_number] file ...\n" + " ssh-keygen -I certificate_identity -s ca_key [-hU] [-D pkcs11_provider]\n" + " [-n principals] [-O option] [-V validity_interval]\n" + " [-z serial_number] file ...\n" " ssh-keygen -L [-f input_keyfile]\n" - " ssh-keygen -A\n" + " ssh-keygen -A [-f prefix_path]\n" " ssh-keygen -k -f krl_file [-u] [-s ca_public] [-z version_number]\n" " file ...\n" " ssh-keygen -Q -f krl_file file ...\n" - " ssh-keygen -Y sign -f sign_key -n namespace\n" - " ssh-keygen -Y verify -I signer_identity -s signature_file\n" - " -n namespace -f allowed_keys [-r revoked_keys]\n" - " ssh-keygen -Y check-novalidate -s signature_file -n namespace\n"); + " ssh-keygen -Y check-novalidate -n namespace -s signature_file\n" + " ssh-keygen -Y sign -f key_file -n namespace file ...\n" + " ssh-keygen -Y verify -f allowed_signers_file -I signer_identity\n" + " -n namespace -s signature_file [-r revocation_file]\n"); exit(1); }