From d72762739b4f079acbe72fdb69b123e338064a33 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 7 Nov 2013 18:08:32 +0100 Subject: wipe the passphrase from the memory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/cerberus.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/cerberus.c b/src/cerberus.c index 76a2f74..88d4ae5 100644 --- a/src/cerberus.c +++ b/src/cerberus.c @@ -137,6 +137,15 @@ int main(int argc, char** argv) } + /* Wipe the passphrase from the memory */ + if (skip_auth == 0) + { + long i; + for (i = 0; *(passphrase + i); i++) + *(passphrase + i) = 0; + } + + /* Reset terminal settings */ reenable_echo(); -- cgit v1.2.3-70-g09d2