summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authorhalex@openbsd.org <halex@openbsd.org>2015-11-20 23:04:01 +0000
committerDamien Miller <djm@mindrot.org>2015-11-28 17:44:32 +1100
commit4d90625b229cf6b3551d81550a9861897509a65f (patch)
treed3b9da58ea03832b4b352c7cb51e01ab89573345 /ssh-keygen.c
parent8ca915fc761519dd1f7766a550ec597a81db5646 (diff)
upstream commit
allow comment change for all supported formats ok djm@ Upstream-ID: 5fc477cf2f119b2d44aa9c683af16cb00bb3744b
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 8183c2fa0..a788b710a 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.282 2015/11/19 01:12:32 djm Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.283 2015/11/20 23:04:01 halex Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1429,9 +1429,11 @@ do_change_comment(struct passwd *pw)
1429 identity_file, ssh_err(r)); 1429 identity_file, ssh_err(r));
1430 } 1430 }
1431 } 1431 }
1432 /* XXX what about new-format keys? */ 1432
1433 if (private->type != KEY_RSA1) { 1433 if (private->type != KEY_RSA1 && private->type != KEY_ED25519 &&
1434 error("Comments are only supported for RSA1 keys."); 1434 !use_new_format) {
1435 error("Comments are only supported for RSA1 or keys stored in "
1436 "the new format (-o).");
1435 explicit_bzero(passphrase, strlen(passphrase)); 1437 explicit_bzero(passphrase, strlen(passphrase));
1436 sshkey_free(private); 1438 sshkey_free(private);
1437 exit(1); 1439 exit(1);