Mercurial > dropbear
comparison common-kex.c @ 252:29afa62b5450 insecure-nocrypto
- a hack for grahame to run dropbear with "none" cipher.
DO NOT USE IF YOU DON'T KNOW THE CONSEQUENCES
Here is your noose. Use it wisely.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 23 Sep 2005 16:29:19 +0000 |
parents | 5e4110bb753a |
children | 64abb124763d |
comparison
equal
deleted
inserted
replaced
251:b02e8eef3c3a | 252:29afa62b5450 |
---|---|
296 hashkeys(C2S_IV, SHA1_HASH_SIZE, &hs, 'A'); | 296 hashkeys(C2S_IV, SHA1_HASH_SIZE, &hs, 'A'); |
297 hashkeys(S2C_IV, SHA1_HASH_SIZE, &hs, 'B'); | 297 hashkeys(S2C_IV, SHA1_HASH_SIZE, &hs, 'B'); |
298 hashkeys(C2S_key, C2S_keysize, &hs, 'C'); | 298 hashkeys(C2S_key, C2S_keysize, &hs, 'C'); |
299 hashkeys(S2C_key, S2C_keysize, &hs, 'D'); | 299 hashkeys(S2C_key, S2C_keysize, &hs, 'D'); |
300 | 300 |
301 if (cbc_start( | 301 if (ses.newkeys->recv_algo_crypt->cipherdesc != NULL) { |
302 find_cipher(ses.newkeys->recv_algo_crypt->cipherdesc->name), | 302 if (cbc_start( |
303 recv_IV, recv_key, | 303 find_cipher(ses.newkeys->recv_algo_crypt->cipherdesc->name), |
304 ses.newkeys->recv_algo_crypt->keysize, 0, | 304 recv_IV, recv_key, |
305 &ses.newkeys->recv_symmetric_struct) != CRYPT_OK) { | 305 ses.newkeys->recv_algo_crypt->keysize, 0, |
306 dropbear_exit("crypto error"); | 306 &ses.newkeys->recv_symmetric_struct) != CRYPT_OK) { |
307 } | 307 dropbear_exit("crypto error"); |
308 | 308 } |
309 if (cbc_start( | 309 } |
310 find_cipher(ses.newkeys->trans_algo_crypt->cipherdesc->name), | 310 |
311 trans_IV, trans_key, | 311 if (ses.newkeys->trans_algo_crypt->cipherdesc != NULL) { |
312 ses.newkeys->trans_algo_crypt->keysize, 0, | 312 if (cbc_start( |
313 &ses.newkeys->trans_symmetric_struct) != CRYPT_OK) { | 313 find_cipher(ses.newkeys->trans_algo_crypt->cipherdesc->name), |
314 dropbear_exit("crypto error"); | 314 trans_IV, trans_key, |
315 ses.newkeys->trans_algo_crypt->keysize, 0, | |
316 &ses.newkeys->trans_symmetric_struct) != CRYPT_OK) { | |
317 dropbear_exit("crypto error"); | |
318 } | |
315 } | 319 } |
316 | 320 |
317 /* MAC keys */ | 321 /* MAC keys */ |
318 hashkeys(ses.newkeys->transmackey, | 322 if (ses.newkeys->trans_algo_mac->hashdesc != NULL) { |
319 ses.newkeys->trans_algo_mac->keysize, &hs, mactransletter); | 323 hashkeys(ses.newkeys->transmackey, |
320 hashkeys(ses.newkeys->recvmackey, | 324 ses.newkeys->trans_algo_mac->keysize, &hs, mactransletter); |
321 ses.newkeys->recv_algo_mac->keysize, &hs, macrecvletter); | 325 } |
326 if (ses.newkeys->recv_algo_mac->hashdesc != NULL) { | |
327 hashkeys(ses.newkeys->recvmackey, | |
328 ses.newkeys->recv_algo_mac->keysize, &hs, macrecvletter); | |
329 } | |
322 | 330 |
323 #ifndef DISABLE_ZLIB | 331 #ifndef DISABLE_ZLIB |
324 gen_new_zstreams(); | 332 gen_new_zstreams(); |
325 #endif | 333 #endif |
326 | 334 |