Mercurial > dropbear
comparison common-kex.c @ 228:5e4110bb753a
- Fixed twofish algorithm naming so it actually works.
- Added support for aes256, twofish256 and sha1-96
- Fixed some debugging statements
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 30 Aug 2005 16:58:57 +0000 |
parents | ad1b24e39bf3 |
children | 29afa62b5450 63601217f5ab |
comparison
equal
deleted
inserted
replaced
227:ad1b24e39bf3 | 228:5e4110bb753a |
---|---|
620 c2s_cipher_algo = ses.buf_match_algo(ses.payload, sshciphers, &goodguess); | 620 c2s_cipher_algo = ses.buf_match_algo(ses.payload, sshciphers, &goodguess); |
621 if (c2s_cipher_algo == NULL) { | 621 if (c2s_cipher_algo == NULL) { |
622 erralgo = "enc c->s"; | 622 erralgo = "enc c->s"; |
623 goto error; | 623 goto error; |
624 } | 624 } |
625 TRACE(("c2s is %s", c2s_cipher_algo->name)) | 625 TRACE(("enc c2s is %s", c2s_cipher_algo->name)) |
626 | 626 |
627 /* encryption_algorithms_server_to_client */ | 627 /* encryption_algorithms_server_to_client */ |
628 s2c_cipher_algo = ses.buf_match_algo(ses.payload, sshciphers, &goodguess); | 628 s2c_cipher_algo = ses.buf_match_algo(ses.payload, sshciphers, &goodguess); |
629 if (s2c_cipher_algo == NULL) { | 629 if (s2c_cipher_algo == NULL) { |
630 erralgo = "enc s->c"; | 630 erralgo = "enc s->c"; |
631 goto error; | 631 goto error; |
632 } | 632 } |
633 TRACE(("s2c is %s", s2c_cipher_algo->name)) | 633 TRACE(("enc s2c is %s", s2c_cipher_algo->name)) |
634 | 634 |
635 /* mac_algorithms_client_to_server */ | 635 /* mac_algorithms_client_to_server */ |
636 c2s_hash_algo = ses.buf_match_algo(ses.payload, sshhashes, &goodguess); | 636 c2s_hash_algo = ses.buf_match_algo(ses.payload, sshhashes, &goodguess); |
637 if (c2s_hash_algo == NULL) { | 637 if (c2s_hash_algo == NULL) { |
638 erralgo = "mac c->s"; | 638 erralgo = "mac c->s"; |
639 goto error; | 639 goto error; |
640 } | 640 } |
641 TRACE(("hash c2s is %s", c2s_hash_algo->name)) | |
641 | 642 |
642 /* mac_algorithms_server_to_client */ | 643 /* mac_algorithms_server_to_client */ |
643 s2c_hash_algo = ses.buf_match_algo(ses.payload, sshhashes, &goodguess); | 644 s2c_hash_algo = ses.buf_match_algo(ses.payload, sshhashes, &goodguess); |
644 if (s2c_hash_algo == NULL) { | 645 if (s2c_hash_algo == NULL) { |
645 erralgo = "mac s->c"; | 646 erralgo = "mac s->c"; |
646 goto error; | 647 goto error; |
647 } | 648 } |
649 TRACE(("hash s2c is %s", s2c_hash_algo->name)) | |
648 | 650 |
649 /* compression_algorithms_client_to_server */ | 651 /* compression_algorithms_client_to_server */ |
650 c2s_comp_algo = ses.buf_match_algo(ses.payload, sshcompress, &goodguess); | 652 c2s_comp_algo = ses.buf_match_algo(ses.payload, sshcompress, &goodguess); |
651 if (c2s_comp_algo == NULL) { | 653 if (c2s_comp_algo == NULL) { |
652 erralgo = "comp c->s"; | 654 erralgo = "comp c->s"; |
653 goto error; | 655 goto error; |
654 } | 656 } |
657 TRACE(("hash c2s is %s", c2s_comp_algo->name)) | |
655 | 658 |
656 /* compression_algorithms_server_to_client */ | 659 /* compression_algorithms_server_to_client */ |
657 s2c_comp_algo = ses.buf_match_algo(ses.payload, sshcompress, &goodguess); | 660 s2c_comp_algo = ses.buf_match_algo(ses.payload, sshcompress, &goodguess); |
658 if (s2c_comp_algo == NULL) { | 661 if (s2c_comp_algo == NULL) { |
659 erralgo = "comp s->c"; | 662 erralgo = "comp s->c"; |
660 goto error; | 663 goto error; |
661 } | 664 } |
665 TRACE(("hash s2c is %s", s2c_comp_algo->name)) | |
662 | 666 |
663 /* languages_client_to_server */ | 667 /* languages_client_to_server */ |
664 buf_eatstring(ses.payload); | 668 buf_eatstring(ses.payload); |
665 | 669 |
666 /* languages_server_to_client */ | 670 /* languages_server_to_client */ |
699 (struct dropbear_hash*)s2c_hash_algo->data; | 703 (struct dropbear_hash*)s2c_hash_algo->data; |
700 ses.newkeys->recv_algo_comp = c2s_comp_algo->val; | 704 ses.newkeys->recv_algo_comp = c2s_comp_algo->val; |
701 ses.newkeys->trans_algo_comp = s2c_comp_algo->val; | 705 ses.newkeys->trans_algo_comp = s2c_comp_algo->val; |
702 } | 706 } |
703 | 707 |
704 TRACE(("enc algo recv %s", algo->name)) | |
705 TRACE(("enc algo trans %s", algo->name)) | |
706 TRACE(("mac algo recv %s", algo->name)) | |
707 TRACE(("mac algo trans %s", algo->name)) | |
708 TRACE(("comp algo recv %s", algo->name)) | |
709 TRACE(("comp algo trans %s", algo->name)) | |
710 | |
711 /* reserved for future extensions */ | 708 /* reserved for future extensions */ |
712 buf_getint(ses.payload); | 709 buf_getint(ses.payload); |
713 return; | 710 return; |
714 | 711 |
715 error: | 712 error: |