diff options
author | Alexander Hall <halex@cvs.openbsd.org> | 2015-11-20 23:04:02 +0000 |
---|---|---|
committer | Alexander Hall <halex@cvs.openbsd.org> | 2015-11-20 23:04:02 +0000 |
commit | 64ebaa2fa1742aa7c0f6986fe1a517e5e3cc717a (patch) | |
tree | c45f87f0c6d2d1a142a69405a1d9864ca80f7c76 /usr.bin | |
parent | 4f916d0f1adcff235dbd3e0466a209aa07165a9b (diff) |
allow comment change for all supported formats
ok djm@
Diffstat (limited to 'usr.bin')
-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); |