=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-keygen.c,v retrieving revision 1.421 retrieving revision 1.426 diff -u -r1.421 -r1.426 --- src/usr.bin/ssh/ssh-keygen.c 2020/10/18 11:32:02 1.421 +++ src/usr.bin/ssh/ssh-keygen.c 2020/11/28 12:52:32 1.426 @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.421 2020/10/18 11:32:02 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.426 2020/11/28 12:52:32 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -55,6 +55,7 @@ #include "sshsig.h" #include "ssh-sk.h" #include "sk-api.h" /* XXX for SSH_SK_USER_PRESENCE_REQD; remove */ +#include "cipher.h" #ifdef ENABLE_PKCS11 #include "ssh-pkcs11.h" @@ -178,7 +179,7 @@ fatal("unknown key type %s", key_type_name); if (*bitsp == 0) { #ifdef WITH_OPENSSL - u_int nid; + int nid; switch(type) { case KEY_DSA: @@ -1831,7 +1832,7 @@ } r = sshkey_certify(public, ca, key_type_name, sk_provider, pin); - notify_complete(notifier); + notify_complete(notifier, "User presence confirmed"); if (r != 0) fatal_r(r, "Couldn't certify key %s", tmp); } @@ -3044,9 +3045,9 @@ "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" @@ -3079,7 +3080,7 @@ " 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"); + " -n namespace -s signature_file [-r revocation_file]\n"); exit(1); } @@ -3234,6 +3235,9 @@ 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;