summaryrefslogtreecommitdiff
path: root/src/protocol/internal/fqterm_ssh2_kex.cpp
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2016-11-05 14:54:10 +0800
committerIru Cai <mytbk920423@gmail.com>2016-11-08 15:16:40 +0800
commit0a817b9fcb8e7a1bf5c4a910eb0de1a549b5ba9f (patch)
treef765c09f54e47f0d1e34afb5d09885579e946c76 /src/protocol/internal/fqterm_ssh2_kex.cpp
parent92c88c20fe34add9876e9d4e89813ea285f1bbac (diff)
downloadfqterm-0a817b9fcb8e7a1bf5c4a910eb0de1a549b5ba9f.tar.xz
Implement ssh_cipher_t for symmetric ciphers in SSH
* remove FQTermSSHCipher and FQTermSSH3DES, use ssh_cipher_t instead * implement EVP ciphers and 3DES-SSH1
Diffstat (limited to 'src/protocol/internal/fqterm_ssh2_kex.cpp')
-rw-r--r--src/protocol/internal/fqterm_ssh2_kex.cpp5
1 files changed, 3 insertions, 2 deletions
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);