summaryrefslogtreecommitdiffhomepage
path: root/common-session.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-04-07 01:36:42 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-04-07 01:36:42 +0800
commitc6bdc810abab5b58aba26a7618c49f3dac58ebd6 (patch)
tree2594798a88e46aff08f0b350925b4a77eb0a6341 /common-session.c
parenta8135dec1e8b9360274679c9ff89cb98cda87930 (diff)
ecc kind of works, needs fixing/testing
--HG-- branch : ecc
Diffstat (limited to 'common-session.c')
-rw-r--r--common-session.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/common-session.c b/common-session.c
index f4fa579..ef8e6fa 100644
--- a/common-session.c
+++ b/common-session.c
@@ -103,7 +103,7 @@ void common_session_init(int sock_in, int sock_out) {
ses.keys->recv.algo_mac = &dropbear_nohash;
ses.keys->trans.algo_mac = &dropbear_nohash;
- ses.keys->algo_kex = -1;
+ ses.keys->algo_kex = NULL;
ses.keys->algo_hostkey = -1;
ses.keys->recv.algo_comp = DROPBEAR_COMP_NONE;
ses.keys->trans.algo_comp = DROPBEAR_COMP_NONE;
@@ -235,7 +235,16 @@ void common_session_cleanup() {
return;
}
- m_free(ses.session_id);
+ if (ses.session_id) {
+ buf_burn(ses.session_id);
+ buf_free(ses.session_id);
+ ses.session_id = NULL;
+ }
+ if (ses.hash) {
+ buf_burn(ses.hash);
+ buf_free(ses.hash);
+ ses.hash = NULL;
+ }
m_burn(ses.keys, sizeof(struct key_context));
m_free(ses.keys);