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 96dd8b43..0518638e 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.267 2015/03/23 06:06:38 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.268 2015/03/31 11:06:49 tobias Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1405,6 +1405,7 @@ do_change_comment(struct passwd *pw) } if (private->type != KEY_RSA1) { fprintf(stderr, "Comments are only supported for RSA1 keys.\n"); + explicit_bzero(passphrase, strlen(passphrase)); sshkey_free(private); exit(1); } |