summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/packet_crypt.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/packet_crypt.c b/src/packet_crypt.c
index 4f6ba176..914727e0 100644
--- a/src/packet_crypt.c
+++ b/src/packet_crypt.c
@@ -77,11 +77,10 @@ int packet_decrypt(ssh_session session, void *data,uint32_t len) {
SAFE_FREE(out);
return -1;
}
- crypto->cbc_decrypt(crypto,data,out,len);
+ crypto->decrypt(crypto,data,out,len);
memcpy(data,out,len);
- memset(out,0,len);
-
+ BURN_BUFFER(out, len);
SAFE_FREE(out);
return 0;
}
@@ -136,10 +135,10 @@ unsigned char *packet_encrypt(ssh_session session, void *data, uint32_t len) {
#endif
}
- crypto->cbc_encrypt(crypto, data, out, len);
+ crypto->encrypt(crypto, data, out, len);
memcpy(data, out, len);
- memset(out, 0, len);
+ BURN_BUFFER(out, len);
SAFE_FREE(out);
if (session->version == 2) {