From 0a817b9fcb8e7a1bf5c4a910eb0de1a549b5ba9f Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Sat, 5 Nov 2016 14:54:10 +0800 Subject: Implement ssh_cipher_t for symmetric ciphers in SSH * remove FQTermSSHCipher and FQTermSSH3DES, use ssh_cipher_t instead * implement EVP ciphers and 3DES-SSH1 --- src/protocol/internal/fqterm_ssh2_kex.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/protocol/internal/fqterm_ssh2_kex.cpp') diff --git a/src/protocol/internal/fqterm_ssh2_kex.cpp b/src/protocol/internal/fqterm_ssh2_kex.cpp index 137a41e..e2fd784 100644 --- a/src/protocol/internal/fqterm_ssh2_kex.cpp +++ b/src/protocol/internal/fqterm_ssh2_kex.cpp @@ -30,6 +30,7 @@ #include "fqterm_ssh_md5.h" #include "fqterm_trace.h" #include "ssh_pubkey_crypto.h" +#include "ssh_cipher.h" namespace FQTerm { @@ -296,8 +297,8 @@ bool FQTermSSH2Kex::changeKeyAlg() { memcpy(session_id_, H_, SHA_DIGEST_LENGTH); } - packet_sender_->setEncryptionType(SSH_CIPHER_3DES); - packet_receiver_->setEncryptionType(SSH_CIPHER_3DES); + packet_sender_->cipher = new_ssh_cipher_evp(EVP_des_ede3_cbc, 24, 8, 8, 1); + packet_receiver_->cipher = new_ssh_cipher_evp(EVP_des_ede3_cbc, 24, 8, 8, 0); packet_sender_->setMacType(FQTERM_SSH_HMAC_SHA1); packet_receiver_->setMacType(FQTERM_SSH_HMAC_SHA1); -- cgit v1.2.3