summaryrefslogtreecommitdiffstats
path: root/src/packet_crypt.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2015-09-23 22:36:50 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2015-09-24 16:46:12 +0200
commit06b9901e64f1ea2a1141115e5645552034d25850 (patch)
treeefc2925fbc734c4f90d7bc5ca01c917a14627586 /src/packet_crypt.c
parent677fa8ced26fb257285fdc1b0729bc49c189c8ee (diff)
downloadlibssh-06b9901e64f1ea2a1141115e5645552034d25850.tar.gz
libssh-06b9901e64f1ea2a1141115e5645552034d25850.tar.xz
libssh-06b9901e64f1ea2a1141115e5645552034d25850.zip
crypto: move key setup in newkeys handler
Diffstat (limited to 'src/packet_crypt.c')
-rw-r--r--src/packet_crypt.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/packet_crypt.c b/src/packet_crypt.c
index 914727e0..83a9bb3d 100644
--- a/src/packet_crypt.c
+++ b/src/packet_crypt.c
@@ -72,11 +72,6 @@ int packet_decrypt(ssh_session session, void *data,uint32_t len) {
return -1;
}
- if (crypto->set_decrypt_key(crypto, session->current_crypto->decryptkey,
- session->current_crypto->decryptIV) < 0) {
- SAFE_FREE(out);
- return -1;
- }
crypto->decrypt(crypto,data,out,len);
memcpy(data,out,len);
@@ -111,12 +106,6 @@ unsigned char *packet_encrypt(ssh_session session, void *data, uint32_t len) {
seq = ntohl(session->send_seq);
crypto = session->current_crypto->out_cipher;
- if (crypto->set_encrypt_key(crypto, session->current_crypto->encryptkey,
- session->current_crypto->encryptIV) < 0) {
- SAFE_FREE(out);
- return NULL;
- }
-
if (session->version == 2) {
ctx = hmac_init(session->current_crypto->encryptMAC, hmac_digest_len(type), type);
if (ctx == NULL) {