summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-03-20 23:13:45 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-03-20 23:13:45 +0800
commit9a4077aaa383a20f5af72be3dcc99525f8830232 (patch)
treeb57313a8fcc1e880f290eeb27232db15a03c08a5
parente5f76715968e5a20936c4c596cb1097dac3c6852 (diff)
downloaddropbear-9a4077aaa383a20f5af72be3dcc99525f8830232.tar.gz
Fix "-m none" case and ugly typo
-rw-r--r--common-kex.c6
-rw-r--r--session.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/common-kex.c b/common-kex.c
index a7fbb70..56b206d 100644
--- a/common-kex.c
+++ b/common-kex.c
@@ -354,17 +354,17 @@ void gen_new_keys() {
}
}
- /* MAC keys */
if (ses.newkeys->trans.algo_mac->hashdesc != NULL) {
hashkeys(ses.newkeys->trans.mackey,
ses.newkeys->trans.algo_mac->keysize, &hs, mactransletter);
+ ses.newkeys->trans.hash_index = find_hash(ses.newkeys->trans.algo_mac->hashdesc->name);
}
+
if (ses.newkeys->recv.algo_mac->hashdesc != NULL) {
hashkeys(ses.newkeys->recv.mackey,
ses.newkeys->recv.algo_mac->keysize, &hs, macrecvletter);
+ ses.newkeys->recv.hash_index = find_hash(ses.newkeys->recv.algo_mac->hashdesc->name);
}
- ses.newkeys->trans.hash_index = find_hash(ses.newkeys->trans.algo_mac->hashdesc->name),
- ses.newkeys->recv.hash_index = find_hash(ses.newkeys->recv.algo_mac->hashdesc->name),
#ifndef DISABLE_ZLIB
gen_new_zstreams();
diff --git a/session.h b/session.h
index e9695fe..4669a8e 100644
--- a/session.h
+++ b/session.h
@@ -63,9 +63,9 @@ void cleantext(unsigned char* dirtytext);
/* crypto parameters that are stored individually for transmit and receive */
struct key_context_directional {
- const struct dropbear_cipher *algo_crypt; /* NULL for none */
+ const struct dropbear_cipher *algo_crypt;
const struct dropbear_cipher_mode *crypt_mode;
- const struct dropbear_hash *algo_mac; /* NULL for none */
+ const struct dropbear_hash *algo_mac;
int hash_index; /* lookup for libtomcrypt */
char algo_comp; /* compression */
#ifndef DISABLE_ZLIB