comparison session.h @ 755:b07eb3dc23ec ecc

refactor kexdh code a bit, start working on ecdh etc
author Matt Johnston <matt@ucc.asn.au>
date Tue, 26 Mar 2013 01:35:22 +0800
parents 4a274f47eabd
children bf9dc2d9c2b1
comparison
equal deleted inserted replaced
725:49f68a7b7a55 755:b07eb3dc23ec
65 struct key_context_directional { 65 struct key_context_directional {
66 const struct dropbear_cipher *algo_crypt; 66 const struct dropbear_cipher *algo_crypt;
67 const struct dropbear_cipher_mode *crypt_mode; 67 const struct dropbear_cipher_mode *crypt_mode;
68 const struct dropbear_hash *algo_mac; 68 const struct dropbear_hash *algo_mac;
69 int hash_index; /* lookup for libtomcrypt */ 69 int hash_index; /* lookup for libtomcrypt */
70 char algo_comp; /* compression */ 70 int algo_comp; /* compression */
71 #ifndef DISABLE_ZLIB 71 #ifndef DISABLE_ZLIB
72 z_streamp zstream; 72 z_streamp zstream;
73 #endif 73 #endif
74 /* actual keys */ 74 /* actual keys */
75 union { 75 union {
84 struct key_context { 84 struct key_context {
85 85
86 struct key_context_directional recv; 86 struct key_context_directional recv;
87 struct key_context_directional trans; 87 struct key_context_directional trans;
88 88
89 char algo_kex; 89 int algo_kex;
90 char algo_hostkey; 90 int algo_hostkey;
91 91
92 int allow_compress; /* whether compression has started (useful in 92 int allow_compress; /* whether compression has started (useful in
93 [email protected] delayed compression case) */ 93 [email protected] delayed compression case) */
94 }; 94 };
95 95
242 USERAUTH_SUCCESS_RCVD, 242 USERAUTH_SUCCESS_RCVD,
243 SESSION_RUNNING 243 SESSION_RUNNING
244 } cli_state; 244 } cli_state;
245 245
246 struct clientsession { 246 struct clientsession {
247 247 struct kex_dh_param *dh_param;
248 mp_int *dh_e, *dh_x; /* Used during KEX */ 248 struct kex_ecdh_param *ecdh_param;
249 cli_kex_state kex_state; /* Used for progressing KEX */ 249 cli_kex_state kex_state; /* Used for progressing KEX */
250 cli_state state; /* Used to progress auth/channelsession etc */ 250 cli_state state; /* Used to progress auth/channelsession etc */
251 unsigned donefirstkex : 1; /* Set when we set sentnewkeys, never reset */ 251 unsigned donefirstkex : 1; /* Set when we set sentnewkeys, never reset */
252 252
253 int tty_raw_mode; /* Whether we're in raw mode (and have to clean up) */ 253 int tty_raw_mode; /* Whether we're in raw mode (and have to clean up) */