- Timestamp:
- Mar 4, 2009, 11:39:50 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.in
r215 r225 1674 1674 sh_kern.o: $(srcsrc)/sh_kern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_kern.h sh_ks_xor.h $(srcinc)/sh_unix.h $(srcinc)/sh_hash.h 1675 1675 sh_suidchk.o: $(srcsrc)/sh_suidchk.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_hash.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_schedule.h $(srcinc)/sh_calls.h 1676 sh_srp.o: $(srcsrc)/sh_srp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/sh_srp.h $(srcinc)/bignum.h 1676 sh_srp.o: $(srcsrc)/sh_srp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/sh_srp.h $(srcinc)/bignum.h $(srcinc)/CuTest.h 1677 1677 sh_fifo.o: $(srcsrc)/sh_fifo.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_fifo.h 1678 1678 sh_tools.o: $(srcsrc)/sh_tools.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/rijndael-api-fst.h $(srcinc)/rijndael-api-fst.h -
trunk/configure.ac
r221 r225 12 12 dnl start 13 13 dnl 14 AM_INIT_AUTOMAKE(samhain, 2.5. 3)14 AM_INIT_AUTOMAKE(samhain, 2.5.4) 15 15 AC_DEFINE([SAMHAIN], 1, [Application is samhain]) 16 16 AC_CANONICAL_HOST -
trunk/depend.dep
r215 r225 22 22 sh_kern.o: $(srcsrc)/sh_kern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_kern.h sh_ks_xor.h $(srcinc)/sh_unix.h $(srcinc)/sh_hash.h 23 23 sh_suidchk.o: $(srcsrc)/sh_suidchk.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_hash.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_schedule.h $(srcinc)/sh_calls.h 24 sh_srp.o: $(srcsrc)/sh_srp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/sh_srp.h $(srcinc)/bignum.h 24 sh_srp.o: $(srcsrc)/sh_srp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/sh_srp.h $(srcinc)/bignum.h $(srcinc)/CuTest.h 25 25 sh_fifo.o: $(srcsrc)/sh_fifo.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_fifo.h 26 26 sh_tools.o: $(srcsrc)/sh_tools.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/rijndael-api-fst.h $(srcinc)/rijndael-api-fst.h -
trunk/depend.sum
r215 r225 1 3041707433 1 2676345821 -
trunk/docs/Changelog
r223 r225 1 1 2.5.4: 2 * fix for incorrect input check in SRP implementation (discovered 3 by Thomas Ptacek) 2 4 * option KernelCheckPCI to switch off check of PCI expansion ROMs 3 5 -
trunk/src/sh_forward.c
r219 r225 1200 1200 /* --- Now send H(A,B,H(Sc)) and check. --- 1201 1201 */ 1202 if (foo_Sc != NULL )1202 if (foo_Sc != NULL && 0 == sh_srp_check_zero (foo_Sc)) 1203 1203 { 1204 1204 sh_srp_M(foo_A, … … 4157 4157 conn->A, 4158 4158 conn->client_entry->verifier); 4159 if (foo_Ss == NULL) 4159 4160 if (foo_Ss == NULL || 0 != sh_srp_check_zero (foo_Ss)) 4160 4161 { 4161 4162 status_update (conn->client_entry, CLT_FAILED); -
trunk/src/sh_srp.c
r138 r225 388 388 if (res != BIG_OK) val = (-1); 389 389 else if (0 != big_zerop(&AB) ) val = (-1); /* 0 != (sign == 0) */ 390 else if (0 != big_zerop(&r) ) val = (-1); /* 0 != (sign == 0) */ 390 391 else val = 0; 391 392 … … 711 712 712 713 713 714 714 #ifdef SH_CUTEST 715 #include "CuTest.h" 716 717 void Test_srp (CuTest *tc) 718 { 719 #if defined(USE_SRP_PROTOCOL) && (defined (SH_WITH_CLIENT) || defined (SH_WITH_SERVER)) 720 721 int result; 722 char modulus[80*4]; 723 bignum a, b, c; 724 bigerr_t res; 725 char *str = NULL; 726 727 res = sh_srp_init(); 728 CuAssertTrue(tc, res == 0); 729 730 (void) sl_strlcpy(modulus, SRP_MODULUS_1024_1, sizeof(modulus)); 731 (void) sl_strlcat(modulus, SRP_MODULUS_1024_2, sizeof(modulus)); 732 (void) sl_strlcat(modulus, SRP_MODULUS_1024_3, sizeof(modulus)); 733 (void) sl_strlcat(modulus, SRP_MODULUS_1024_4, sizeof(modulus)); 734 735 res = big_create(&a); 736 CuAssertTrue(tc, res == BIG_OK); 737 738 /* Check plain zero 739 */ 740 result = sh_srp_check_zero ("0"); 741 CuAssertTrue(tc, result != 0); 742 743 res = big_set_string ("0", 16, &a); 744 CuAssertTrue(tc, res == BIG_OK); 745 746 result = sh_srp_check_zero (big_string(&a, 16)); 747 CuAssertTrue(tc, result != 0); 748 749 /* Check modulus (equals 0 % M) 750 */ 751 result = sh_srp_check_zero (modulus); 752 CuAssertTrue(tc, result != 0); 753 754 res = big_set_string (modulus, 16, &a); 755 CuAssertTrue(tc, res == BIG_OK); 756 757 result = sh_srp_check_zero (big_string(&a, 16)); 758 CuAssertTrue(tc, result != 0); 759 760 /* Check non-zero 761 */ 762 modulus[0] = 'a'; 763 764 result = sh_srp_check_zero (modulus); 765 CuAssertTrue(tc, result == 0); 766 767 res = big_set_string (modulus, 16, &a); 768 CuAssertTrue(tc, res == BIG_OK); 769 770 result = sh_srp_check_zero (big_string(&a, 16)); 771 CuAssertTrue(tc, result == 0); 772 773 modulus[0] = 'f'; 774 775 /* Check multiple of modulus 776 */ 777 res = big_set_string (modulus, 16, &a); 778 CuAssertTrue(tc, res == BIG_OK); 779 780 res = big_create(&b); 781 CuAssertTrue(tc, res == BIG_OK); 782 783 res = big_create(&c); 784 CuAssertTrue(tc, res == BIG_OK); 785 786 res = big_set_string ("deadbeef", 16, &b); 787 CuAssertTrue(tc, res == BIG_OK); 788 789 res = big_mul (&a, &b, &c); 790 CuAssertTrue(tc, res == BIG_OK); 791 792 str = strdup(big_string (&c, 16)); 793 CuAssertPtrNotNull(tc, str); 794 795 result = sh_srp_check_zero (str); 796 CuAssertTrue(tc, result != 0); 797 798 #else 799 (void) tc; /* fix compiler warning */ 800 #endif 801 return; 802 } 803 #endif 804 805 806 -
trunk/test/testhash.sh
r223 r225 37 37 fi 38 38 # 39 ${TOP_SRCDIR}/configure --quiet $TRUST --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file --enable-debug 39 ${TOP_SRCDIR}/configure --quiet $TRUST --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file --enable-debug 40 40 # 41 41 fail=0
Note:
See TracChangeset
for help on using the changeset viewer.