diff options
author | Iru Cai <mytbk920423@gmail.com> | 2018-04-28 21:50:54 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2018-04-30 15:20:28 +0800 |
commit | ef70cc73c69d04e93c9af5fb49c5d762ba226801 (patch) | |
tree | 2f96375bb6047f1a6161c00f659e222711db3cd7 /src/protocol/internal/fqterm_ssh2_kex.h | |
parent | bec678f312d282cd467a4d13dbf29c37ea111ce7 (diff) | |
download | fqterm-ef70cc73c69d04e93c9af5fb49c5d762ba226801.tar.xz |
Add a connection info field in FQTermSocket
- the connection info record contains the name of the
cipher and MAC algorithms, and the key hash
- after doing a key exchange, the connection info will
be filled
Diffstat (limited to 'src/protocol/internal/fqterm_ssh2_kex.h')
-rw-r--r-- | src/protocol/internal/fqterm_ssh2_kex.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/protocol/internal/fqterm_ssh2_kex.h b/src/protocol/internal/fqterm_ssh2_kex.h index 0a09cc1..80da76d 100644 --- a/src/protocol/internal/fqterm_ssh2_kex.h +++ b/src/protocol/internal/fqterm_ssh2_kex.h @@ -55,6 +55,8 @@ private: char *I_C_; int I_S_len_; char *I_S_; + int K_S_len_; + char *K_S_; SSH_DH *dh; BIGNUM *bn_x_; @@ -70,9 +72,6 @@ private: bool is_first_kex_; - ssh_pubkey_t *host_key_; - ssh_pubkey_t *server_key_; - u_char cookie_[16]; int server_flag_, ciphers_, auth_; // u_char session_id_[16]; @@ -92,6 +91,10 @@ public: virtual void initKex(FQTermSSHPacketReceiver *packetReceiver, FQTermSSHPacketSender *outputSender); + void hostKeyHash(unsigned char *md) + { + SHA256((const unsigned char*)K_S_, K_S_len_, md); + } public slots: void handlePacket(int type); |