From 423fa6818bcce491d4e4dafc8e5306905f5e5255 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Wed, 21 Jan 2015 15:38:10 +0100 Subject: ed25519: ADd OpenSSH encrypted container import Signed-off-by: Aris Adamantiadis Reviewed-by: Andreas Schneider --- src/wrapper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/wrapper.c') diff --git a/src/wrapper.c b/src/wrapper.c index bcd941b3..c1dd4d03 100644 --- a/src/wrapper.c +++ b/src/wrapper.c @@ -103,7 +103,7 @@ static struct ssh_cipher_struct *cipher_new(int offset) { return cipher; } -static void cipher_free(struct ssh_cipher_struct *cipher) { +void ssh_cipher_clear(struct ssh_cipher_struct *cipher){ #ifdef HAVE_LIBGCRYPT unsigned int i; #endif @@ -123,6 +123,10 @@ static void cipher_free(struct ssh_cipher_struct *cipher) { #endif SAFE_FREE(cipher->key); } +} + +static void cipher_free(struct ssh_cipher_struct *cipher) { + ssh_cipher_clear(cipher); SAFE_FREE(cipher); } -- cgit