# HG changeset patch # User Matt Johnston # Date 1363792425 -28800 # Node ID bf0ac0512ef7767831fd655b1b4cf0b9bd932cfd # Parent f4232b65b316ffbc2028479e42a96fdebb26f07e Fix "-m none" case and ugly typo diff -r f4232b65b316 -r bf0ac0512ef7 common-kex.c --- a/common-kex.c Wed Mar 20 23:13:19 2013 +0800 +++ b/common-kex.c Wed Mar 20 23:13:45 2013 +0800 @@ -354,17 +354,17 @@ } } - /* 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 -r f4232b65b316 -r bf0ac0512ef7 session.h --- a/session.h Wed Mar 20 23:13:19 2013 +0800 +++ b/session.h Wed Mar 20 23:13:45 2013 +0800 @@ -63,9 +63,9 @@ /* 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