diff options
author | tobias@openbsd.org <tobias@openbsd.org> | 2015-03-31 11:06:49 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-04-01 10:00:27 +1100 |
commit | 704d8c88988cae38fb755a6243b119731d223222 (patch) | |
tree | 8f1976e89eed12c5bca4ac2c8381fa5e6de9320d /ssh-keygen.c | |
parent | 78de1673c05ea2c33e0d4a4b64ecb5186b6ea2e9 (diff) |
upstream commit
Comments are only supported for RSA1 keys. If a user
tried to add one and entered his passphrase, explicitly clear it before exit.
This is done in all other error paths, too.
ok djm
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 96dd8b439..0518638e0 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.267 2015/03/23 06:06:38 djm Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.268 2015/03/31 11:06:49 tobias 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 |
@@ -1405,6 +1405,7 @@ do_change_comment(struct passwd *pw) | |||
1405 | } | 1405 | } |
1406 | if (private->type != KEY_RSA1) { | 1406 | if (private->type != KEY_RSA1) { |
1407 | fprintf(stderr, "Comments are only supported for RSA1 keys.\n"); | 1407 | fprintf(stderr, "Comments are only supported for RSA1 keys.\n"); |
1408 | explicit_bzero(passphrase, strlen(passphrase)); | ||
1408 | sshkey_free(private); | 1409 | sshkey_free(private); |
1409 | exit(1); | 1410 | exit(1); |
1410 | } | 1411 | } |