diff options
author | 2020-11-27 10:12:30 +0000 | |
---|---|---|
committer | 2020-11-27 10:12:30 +0000 | |
commit | 6496ed4fadad9f118e45477b8612ca0f77500e56 (patch) | |
tree | 1b2728b5ae3c5c7195b02ac5592c5c7cdde4072e /usr.bin/ssh/ssh-keygen.c | |
parent | Set the specified TOS/DSCP for interactive use prior to TCP connect. (diff) | |
download | wireguard-openbsd-6496ed4fadad9f118e45477b8612ca0f77500e56.tar.xz wireguard-openbsd-6496ed4fadad9f118e45477b8612ca0f77500e56.zip |
Document ssh-keygen -Z, sanity check its argument earlier and provide
a better error message if it's not correct. Prompted by bz#2879,
ok djm@ jmc@
Diffstat (limited to 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index e30b99d25e5..1a6236390ca 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.424 2020/11/08 22:37:24 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.425 2020/11/27 10:12:30 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -3044,9 +3044,9 @@ usage(void) "usage: ssh-keygen [-q] [-a rounds] [-b bits] [-C comment] [-f output_keyfile]\n" " [-m format] [-N new_passphrase] [-O option]\n" " [-t dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa]\n" - " [-w provider]\n" + " [-w provider] [-Z cipher]\n" " ssh-keygen -p [-a rounds] [-f keyfile] [-m format] [-N new_passphrase]\n" - " [-P old_passphrase]\n" + " [-P old_passphrase] [-Z cipher]\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" @@ -3234,6 +3234,9 @@ main(int argc, char **argv) break; case 'Z': openssh_format_cipher = optarg; + if (cipher_by_name(openssh_format_cipher) == NULL) + fatal("Invalid OpenSSH-format cipher '%s'", + openssh_format_cipher); break; case 'C': identity_comment = optarg; |