From ef70cc73c69d04e93c9af5fb49c5d762ba226801 Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Sat, 28 Apr 2018 21:50:54 +0800 Subject: 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 --- src/protocol/connect_info.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/protocol/connect_info.h (limited to 'src/protocol/connect_info.h') diff --git a/src/protocol/connect_info.h b/src/protocol/connect_info.h new file mode 100644 index 0000000..0111a39 --- /dev/null +++ b/src/protocol/connect_info.h @@ -0,0 +1,25 @@ +#ifndef CONNECT_INFO_H +#define CONNECT_INFO_H + +enum protocol +{ + PROTO_LOCAL, + PROTO_TELNET, + PROTO_SSH +}; + +typedef struct +{ + enum protocol proto; + struct + { + int proto_version; + const char *c2s_cipher; + const char *s2c_cipher; + const char *c2s_mac; + const char *s2c_mac; + unsigned char hash[32]; + } ssh_proto_info; +} conn_info_t; + +#endif -- cgit v1.2.3