summaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-12-10 09:03:47 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-10 09:03:47 -0500
commitce3b7ddb5494d51868bbaa1922f9bdb192907527 (patch)
treeb42cab236ba71757ebf4f231ff688f6e376cfa0b /src/common/crypto.c
parent7186e2a94361e29188ba43837e244683ce7fbf04 (diff)
downloadtor-ce3b7ddb5494d51868bbaa1922f9bdb192907527.tar.gz
tor-ce3b7ddb5494d51868bbaa1922f9bdb192907527.zip
improve a comment in memwipe
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r--src/common/crypto.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 816423aa85..ba5c8a79b5 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -2817,7 +2817,11 @@ memwipe(void *mem, uint8_t byte, size_t sz)
* variable. It's an elaborate ruse to trick the compiler into not
* optimizing out the "wipe this memory" code. Read it if you like zany
* programming tricks! In later versions of Tor, we should look for better
- * not-optimized-out memory wiping stuff. */
+ * not-optimized-out memory wiping stuff...
+ *
+ * ...or maybe not. In practice, there are pure-asm implementations of
+ * OPENSSL_cleanse() on most platforms, which ought to do the job.
+ **/
OPENSSL_cleanse(mem, sz);
/* Just in case some caller of memwipe() is relying on getting a buffer
* filled with a particular value, fill the buffer.