aboutsummaryrefslogtreecommitdiff
path: root/src/wrapper.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2015-01-21 15:38:10 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-02-02 14:45:52 +0100
commit423fa6818bcce491d4e4dafc8e5306905f5e5255 (patch)
tree2979137239e5d8c376d643e128491bfa3276b92a /src/wrapper.c
parent61e2c8f0f75d6cf0948fbac71d92937b9d58fd22 (diff)
downloadlibssh-423fa6818bcce491d4e4dafc8e5306905f5e5255.tar.gz
libssh-423fa6818bcce491d4e4dafc8e5306905f5e5255.tar.xz
libssh-423fa6818bcce491d4e4dafc8e5306905f5e5255.zip
ed25519: ADd OpenSSH encrypted container import
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/wrapper.c')
-rw-r--r--src/wrapper.c6
1 files changed, 5 insertions, 1 deletions
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);
}