aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2014-10-20 03:06:28 +1100
committerteor <teor2345@gmail.com>2014-10-20 03:06:28 +1100
commit2e1f5c1fc0f6239a8bb9f409f1f170fb21ce1a37 (patch)
tree106aa23854a7aea7cf166548300fcd7c3e69f263 /src/or/router.c
parentfc5cab44724e8328e2186f22114625388f1c8f0d (diff)
downloadtor-2e1f5c1fc0f6239a8bb9f409f1f170fb21ce1a37.tar.gz
tor-2e1f5c1fc0f6239a8bb9f409f1f170fb21ce1a37.zip
Memwipe more keys after tor has finished with them
Ensure we securely wipe keys from memory after crypto_digest_get_digest and init_curve25519_keypair_from_file have finished using them. Fixes bug 13477.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 5d1d2ff337..bbbf9c4b84 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -488,7 +488,7 @@ init_curve25519_keypair_from_file(curve25519_keypair_t *keys_out,
if (curve25519_keypair_write_to_file(keys_out, fname, tag)<0) {
tor_log(severity, LD_FS,
"Couldn't write generated key to \"%s\".", fname);
- memset(keys_out, 0, sizeof(*keys_out));
+ memwipe(keys_out, 0, sizeof(*keys_out));
goto error;
}
} else {