Mercurial > dropbear
comparison common-kex.c @ 642:33fd2f3499d2 dropbear-tfm
A few build fixes
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 22 Nov 2011 19:28:58 +0700 |
parents | 2b1bb792cd4d |
children |
comparison
equal
deleted
inserted
replaced
641:2b1bb792cd4d | 642:33fd2f3499d2 |
---|---|
517 ses.kexstate.recvkexinit = 1; | 517 ses.kexstate.recvkexinit = 1; |
518 | 518 |
519 TRACE(("leave recv_msg_kexinit")) | 519 TRACE(("leave recv_msg_kexinit")) |
520 } | 520 } |
521 | 521 |
522 static void load_dh_p(mp_int * dh_p) | 522 static void load_dh_p(fp_int * dh_p) |
523 { | 523 { |
524 switch (ses.newkeys->algo_kex) { | 524 switch (ses.newkeys->algo_kex) { |
525 case DROPBEAR_KEX_DH_GROUP1: | 525 case DROPBEAR_KEX_DH_GROUP1: |
526 bytes_to_fp(dh_p, dh_p_1, DH_P_1_LEN); | 526 bytes_to_fp(dh_p, dh_p_1, DH_P_1_LEN); |
527 break; | 527 break; |
642 /* for asymmetry */ | 642 /* for asymmetry */ |
643 algo_type * c2s_hash_algo = NULL; | 643 algo_type * c2s_hash_algo = NULL; |
644 algo_type * s2c_hash_algo = NULL; | 644 algo_type * s2c_hash_algo = NULL; |
645 algo_type * c2s_cipher_algo = NULL; | 645 algo_type * c2s_cipher_algo = NULL; |
646 algo_type * s2c_cipher_algo = NULL; | 646 algo_type * s2c_cipher_algo = NULL; |
647 algo_type * c2s_cofp_algo = NULL; | 647 algo_type * c2s_comp_algo = NULL; |
648 algo_type * s2c_cofp_algo = NULL; | 648 algo_type * s2c_comp_algo = NULL; |
649 /* the generic one */ | 649 /* the generic one */ |
650 algo_type * algo = NULL; | 650 algo_type * algo = NULL; |
651 | 651 |
652 /* which algo couldn't match */ | 652 /* which algo couldn't match */ |
653 char * erralgo = NULL; | 653 char * erralgo = NULL; |
711 goto error; | 711 goto error; |
712 } | 712 } |
713 TRACE(("hash s2c is %s", s2c_hash_algo->name)) | 713 TRACE(("hash s2c is %s", s2c_hash_algo->name)) |
714 | 714 |
715 /* compression_algorithms_client_to_server */ | 715 /* compression_algorithms_client_to_server */ |
716 <<<<<<< mine | |
717 c2s_cofp_algo = ses.buf_match_algo(ses.payload, sshcompress, &goodguess); | |
718 if (c2s_cofp_algo == NULL) { | |
719 ======= | |
720 c2s_comp_algo = ses.buf_match_algo(ses.payload, ses.compress_algos, &goodguess); | 716 c2s_comp_algo = ses.buf_match_algo(ses.payload, ses.compress_algos, &goodguess); |
721 if (c2s_comp_algo == NULL) { | 717 if (c2s_comp_algo == NULL) { |
722 >>>>>>> theirs | |
723 erralgo = "comp c->s"; | 718 erralgo = "comp c->s"; |
724 goto error; | 719 goto error; |
725 } | 720 } |
726 TRACE(("hash c2s is %s", c2s_cofp_algo->name)) | 721 TRACE(("hash c2s is %s", c2s_comp_algo->name)) |
727 | 722 |
728 /* compression_algorithms_server_to_client */ | 723 /* compression_algorithms_server_to_client */ |
729 <<<<<<< mine | |
730 s2c_cofp_algo = ses.buf_match_algo(ses.payload, sshcompress, &goodguess); | |
731 if (s2c_cofp_algo == NULL) { | |
732 ======= | |
733 s2c_comp_algo = ses.buf_match_algo(ses.payload, ses.compress_algos, &goodguess); | 724 s2c_comp_algo = ses.buf_match_algo(ses.payload, ses.compress_algos, &goodguess); |
734 if (s2c_comp_algo == NULL) { | 725 if (s2c_comp_algo == NULL) { |
735 >>>>>>> theirs | |
736 erralgo = "comp s->c"; | 726 erralgo = "comp s->c"; |
737 goto error; | 727 goto error; |
738 } | 728 } |
739 TRACE(("hash s2c is %s", s2c_cofp_algo->name)) | 729 TRACE(("hash s2c is %s", s2c_comp_algo->name)) |
740 | 730 |
741 /* languages_client_to_server */ | 731 /* languages_client_to_server */ |
742 buf_eatstring(ses.payload); | 732 buf_eatstring(ses.payload); |
743 | 733 |
744 /* languages_server_to_client */ | 734 /* languages_server_to_client */ |
765 (struct dropbear_cipher_mode*)c2s_cipher_algo->mode; | 755 (struct dropbear_cipher_mode*)c2s_cipher_algo->mode; |
766 ses.newkeys->recv.algo_mac = | 756 ses.newkeys->recv.algo_mac = |
767 (struct dropbear_hash*)s2c_hash_algo->data; | 757 (struct dropbear_hash*)s2c_hash_algo->data; |
768 ses.newkeys->trans.algo_mac = | 758 ses.newkeys->trans.algo_mac = |
769 (struct dropbear_hash*)c2s_hash_algo->data; | 759 (struct dropbear_hash*)c2s_hash_algo->data; |
770 <<<<<<< mine | |
771 ses.newkeys->recv_algo_comp = s2c_cofp_algo->val; | |
772 ses.newkeys->trans_algo_comp = c2s_cofp_algo->val; | |
773 ======= | |
774 ses.newkeys->recv.algo_comp = s2c_comp_algo->val; | 760 ses.newkeys->recv.algo_comp = s2c_comp_algo->val; |
775 ses.newkeys->trans.algo_comp = c2s_comp_algo->val; | 761 ses.newkeys->trans.algo_comp = c2s_comp_algo->val; |
776 >>>>>>> theirs | |
777 } else { | 762 } else { |
778 /* SERVER */ | 763 /* SERVER */ |
779 ses.newkeys->recv.algo_crypt = | 764 ses.newkeys->recv.algo_crypt = |
780 (struct dropbear_cipher*)c2s_cipher_algo->data; | 765 (struct dropbear_cipher*)c2s_cipher_algo->data; |
781 ses.newkeys->trans.algo_crypt = | 766 ses.newkeys->trans.algo_crypt = |
786 (struct dropbear_cipher_mode*)s2c_cipher_algo->mode; | 771 (struct dropbear_cipher_mode*)s2c_cipher_algo->mode; |
787 ses.newkeys->recv.algo_mac = | 772 ses.newkeys->recv.algo_mac = |
788 (struct dropbear_hash*)c2s_hash_algo->data; | 773 (struct dropbear_hash*)c2s_hash_algo->data; |
789 ses.newkeys->trans.algo_mac = | 774 ses.newkeys->trans.algo_mac = |
790 (struct dropbear_hash*)s2c_hash_algo->data; | 775 (struct dropbear_hash*)s2c_hash_algo->data; |
791 <<<<<<< mine | |
792 ses.newkeys->recv_algo_comp = c2s_cofp_algo->val; | |
793 ses.newkeys->trans_algo_comp = s2c_cofp_algo->val; | |
794 ======= | |
795 ses.newkeys->recv.algo_comp = c2s_comp_algo->val; | 776 ses.newkeys->recv.algo_comp = c2s_comp_algo->val; |
796 ses.newkeys->trans.algo_comp = s2c_comp_algo->val; | 777 ses.newkeys->trans.algo_comp = s2c_comp_algo->val; |
797 >>>>>>> theirs | |
798 } | 778 } |
799 | 779 |
800 /* reserved for future extensions */ | 780 /* reserved for future extensions */ |
801 buf_getint(ses.payload); | 781 buf_getint(ses.payload); |
802 return; | 782 return; |