From ebcff9fd630f8bd26b0cda23e39c63805f2b781b Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 12 Feb 2018 14:35:55 +0100 Subject: src: Use explicit_bzero() if available on the platform Signed-off-by: Andreas Schneider --- src/libcrypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libcrypto.c') 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); } -- cgit v1.2.3