summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 299ba79c8..727b876de 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: ssh-keygen.c,v 1.81 2001/09/17 20:50:22 markus Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.82 2001/09/28 12:07:09 djm Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
@@ -495,6 +495,14 @@ do_upload(struct passwd *pw, const char *sc_reader_id)
495 status = 0; 495 status = 0;
496 log("loading key done"); 496 log("loading key done");
497done: 497done:
498
499 memset(elements[0], '\0', BN_num_bytes(prv->rsa->q));
500 memset(elements[1], '\0', BN_num_bytes(prv->rsa->p));
501 memset(elements[2], '\0', BN_num_bytes(prv->rsa->iqmp));
502 memset(elements[3], '\0', BN_num_bytes(prv->rsa->dmq1));
503 memset(elements[4], '\0', BN_num_bytes(prv->rsa->dmp1));
504 memset(elements[5], '\0', BN_num_bytes(prv->rsa->n));
505
498 if (prv) 506 if (prv)
499 key_free(prv); 507 key_free(prv);
500 for (i = 0; i < NUM_RSA_KEY_ELEMENTS; i++) 508 for (i = 0; i < NUM_RSA_KEY_ELEMENTS; i++)