aboutsummaryrefslogtreecommitdiff
path: root/src/libcrypto.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-02-12 14:35:55 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-02-12 14:41:27 +0100
commitebcff9fd630f8bd26b0cda23e39c63805f2b781b (patch)
tree117d6f7a61ebf2dbef4df9e3f09f487077afb79c /src/libcrypto.c
parent25ff1214a40531cea33a91eed6225d4f4bf51cbc (diff)
downloadlibssh-ebcff9fd630f8bd26b0cda23e39c63805f2b781b.tar.gz
libssh-ebcff9fd630f8bd26b0cda23e39c63805f2b781b.tar.xz
libssh-ebcff9fd630f8bd26b0cda23e39c63805f2b781b.zip
src: Use explicit_bzero() if available on the platform
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/libcrypto.c')
-rw-r--r--src/libcrypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcrypto.c b/src/libcrypto.c
index 59c99568..66453666 100644
--- a/src/libcrypto.c
+++ b/src/libcrypto.c
@@ -606,7 +606,7 @@ static void aes_ctr_encrypt(struct ssh_cipher_struct *cipher, void *in, void *ou
}
static void aes_ctr_cleanup(struct ssh_cipher_struct *cipher){
- BURN_BUFFER(cipher->aes_key, sizeof(*cipher->aes_key));
+ explicit_bzero(cipher->aes_key, sizeof(*cipher->aes_key));
SAFE_FREE(cipher->aes_key);
}
@@ -695,7 +695,7 @@ static void des1_1_decrypt(struct ssh_cipher_struct *cipher, void *in, void *out
}
static void des_cleanup(struct ssh_cipher_struct *cipher){
- BURN_BUFFER(cipher->des3_key, sizeof(*cipher->des3_key));
+ explicit_bzero(cipher->des3_key, sizeof(*cipher->des3_key));
SAFE_FREE(cipher->des3_key);
}