summaryrefslogtreecommitdiff
path: root/kex.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-06-26 21:07:34 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-06-26 21:07:34 +0800
commit71b4ec569cb33a5dcd4abf50650ccd78e6d3b2dd (patch)
tree497adde943fd41206f8d263131b255dda1833ca1 /kex.h
parent3187f27fcd533b8d16feebba9090007c82725eff (diff)
parenteaf9be05d7d9de22f2ff936882874331fc2d1a0e (diff)
downloaddropbear-71b4ec569cb33a5dcd4abf50650ccd78e6d3b2dd.tar.gz
merge coverity from maincoverity
Diffstat (limited to 'kex.h')
-rw-r--r--kex.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/kex.h b/kex.h
index 03dcbb1..77cf21a 100644
--- a/kex.h
+++ b/kex.h
@@ -36,10 +36,12 @@ void recv_msg_newkeys(void);
void kexfirstinitialise(void);
void finish_kexhashbuf(void);
+#if DROPBEAR_NORMAL_DH
struct kex_dh_param *gen_kexdh_param(void);
void free_kexdh_param(struct kex_dh_param *param);
void kexdh_comb_key(struct kex_dh_param *param, mp_int *dh_pub_them,
sign_key *hostkey);
+#endif
#if DROPBEAR_ECDH
struct kex_ecdh_param *gen_kexecdh_param(void);
@@ -65,6 +67,8 @@ void recv_msg_kexdh_init(void); /* server */
void send_msg_kexdh_init(void); /* client */
void recv_msg_kexdh_reply(void); /* client */
+void recv_msg_ext_info(void);
+
struct KEXState {
unsigned sentkexinit : 1; /*set when we've sent/recv kexinit packet */
@@ -73,8 +77,9 @@ struct KEXState {
unsigned sentnewkeys : 1; /* set once we've send MSG_NEWKEYS (will be cleared once we have also received */
unsigned recvnewkeys : 1; /* set once we've received MSG_NEWKEYS (cleared once we have also sent */
- unsigned donefirstkex : 1; /* Set to 1 after the first kex has completed,
+ unsigned int donefirstkex; /* Set to 1 after the first kex has completed,
ie the transport layer has been set up */
+ unsigned int donesecondkex; /* Set to 1 after the second kex has completed */
unsigned our_first_follows_matches : 1;
@@ -84,10 +89,12 @@ struct KEXState {
};
+#if DROPBEAR_NORMAL_DH
struct kex_dh_param {
mp_int pub; /* e */
mp_int priv; /* x */
};
+#endif
#if DROPBEAR_ECDH
struct kex_ecdh_param {
@@ -101,9 +108,6 @@ struct kex_curve25519_param {
unsigned char priv[CURVE25519_LEN];
unsigned char pub[CURVE25519_LEN];
};
-
-/* No header file for curve25519_donna */
-int curve25519_donna(unsigned char *out, const unsigned char *secret, const unsigned char *other);
#endif
#endif /* DROPBEAR_KEX_H_ */