Fix "-m none" case and ugly typo

This commit is contained in:
Matt Johnston 2013-03-20 23:13:45 +08:00
parent 34f9b2a8f7
commit 2259ce4cdf
2 changed files with 5 additions and 5 deletions

View File

@ -354,17 +354,17 @@ void gen_new_keys() {
} }
} }
/* MAC keys */
if (ses.newkeys->trans.algo_mac->hashdesc != NULL) { if (ses.newkeys->trans.algo_mac->hashdesc != NULL) {
hashkeys(ses.newkeys->trans.mackey, hashkeys(ses.newkeys->trans.mackey,
ses.newkeys->trans.algo_mac->keysize, &hs, mactransletter); 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) { if (ses.newkeys->recv.algo_mac->hashdesc != NULL) {
hashkeys(ses.newkeys->recv.mackey, hashkeys(ses.newkeys->recv.mackey,
ses.newkeys->recv.algo_mac->keysize, &hs, macrecvletter); 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 #ifndef DISABLE_ZLIB
gen_new_zstreams(); gen_new_zstreams();

View File

@ -63,9 +63,9 @@ void cleantext(unsigned char* dirtytext);
/* crypto parameters that are stored individually for transmit and receive */ /* crypto parameters that are stored individually for transmit and receive */
struct key_context_directional { 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_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 */ int hash_index; /* lookup for libtomcrypt */
char algo_comp; /* compression */ char algo_comp; /* compression */
#ifndef DISABLE_ZLIB #ifndef DISABLE_ZLIB