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.
This commit is contained in:
teor
2014-10-20 03:06:28 +11:00
parent fc5cab4472
commit 2e1f5c1fc0
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -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 {