diff options
author | 2015-11-20 23:04:01 +0000 | |
---|---|---|
committer | 2015-11-20 23:04:01 +0000 | |
commit | 3844fc02fda47ef0cc5f222817a2bedfa91f769b (patch) | |
tree | b0e58076bf6379a179c698fd9f5481ab642625af /usr.bin/ssh/ssh-keygen.c | |
parent | Memory leaks and an uninitialized part of utf8_data, from Patrick Palka. (diff) | |
download | wireguard-openbsd-3844fc02fda47ef0cc5f222817a2bedfa91f769b.tar.xz wireguard-openbsd-3844fc02fda47ef0cc5f222817a2bedfa91f769b.zip |
allow comment change for all supported formats
ok djm@
Diffstat (limited to 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 049d0686383..62bde5a8915 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.282 2015/11/19 01:12:32 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.283 2015/11/20 23:04:01 halex Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1414,9 +1414,11 @@ do_change_comment(struct passwd *pw) identity_file, ssh_err(r)); } } - /* XXX what about new-format keys? */ - if (private->type != KEY_RSA1) { - error("Comments are only supported for RSA1 keys."); + + if (private->type != KEY_RSA1 && private->type != KEY_ED25519 && + !use_new_format) { + error("Comments are only supported for RSA1 or keys stored in " + "the new format (-o)."); explicit_bzero(passphrase, strlen(passphrase)); sshkey_free(private); exit(1); |