1376 Commits

Author SHA1 Message Date
Michael Rash
196fef65b6 [libfko] move is_base64 check to libfko
This commit replaces the separately implemented client/server
is_base64() check with a single libfko function, and libfko itself now
uses it as well before prepending Rijndael or GnuPG base64 encoded
prefixes.
2013-11-16 19:20:08 -05:00
Michael Rash
173b7518e1 Merge branch 'mac_os_x_mavericks_build' of ssh://10.211.55.3/home/parallels/git/fwknop into mac_os_x_mavericks_build 2013-11-15 14:55:28 -05:00
Michael Rash
63568d061b minor hex_dump() formatting bug fix to properly align ascii remainder output 2013-11-15 14:53:04 -05:00
Michael Rash
6d78c49ef9 [libfko] minor update to print 'None' for the HMAC type when an HMAC is not used instead of just diplaying '()' 2013-11-14 23:13:33 -05:00
Michael Rash
cb2fc3abbe [test suite] handle LD_LIBRARY_PATH from the main test-fwknop.pl script 2013-11-14 22:47:13 -05:00
Michael Rash
a6f030412f [test suite] added Rijndael/HMAC compatibility tests for Mac OS X 10.9 2013-11-14 10:37:36 -05:00
Michael Rash
6870e65800 [test suite] minor cleanup to remove uncessary 'fatal' test hash keys 2013-11-14 10:24:58 -05:00
Michael Rash
5f51d7b3eb [test suite] added support for 'otool' instead of 'ldd' on Mac OS X systems 2013-11-14 09:59:28 -05:00
Michael Rash
af3d4fa926 minor extras/apparmor configure_args.sh path typo fix 2013-11-14 09:55:43 -05:00
Michael Rash
10ac35b344 added extras/apparmor configure_args.sh helper script for building fwknop with args that AppArmor expects 2013-11-14 09:54:38 -05:00
Michael Rash
1299a8ee87 [test suite] added DYLD_LIBRARY_PATH for Mac OS X 10.9 2013-11-12 23:05:16 -05:00
Michael Rash
e75117616e [server] ignore pcap direction for sniffing link type DLT_NULL interfaces (fixes OS X 10.9 test suite runs) 2013-11-12 23:04:35 -05:00
Michael Rash
23ef1d4e59 [libfko] Candidate build fix for Mac OS X 10.9 (closes #108)
Nikolay Kolev reported a build issue on Mac OS X 10.9 (Mavericks) where fwknop
copies of strlcpy() and strlcat() functions were conflicting with those that ship
with OS X 10.9.

The solution was to add a configure.ac check for strlcat() and strlcpy() and
wrap "#if !HAVE_..." checks around those functions.

A portion of the build errors looked like this:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in lib
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I ../common   -g -O2 -Wall -Wformat -Wformat-security -fstack-protector-all -fstack-protector -fPIE -D_FORTIFY_SOURCE=2 -MT base64.lo -MD -MP -MF .deps/base64.Tpo -c -o base64.lo base64.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I ../common -g -O2 -Wall -Wformat -Wformat-security -fstack-protector-all -fstack-protector -D_FORTIFY_SOURCE=2 -MT base64.lo -MD -MP -MF .deps/base64.Tpo -c base64.c  -fno-common -DPIC -o .libs/base64.o
In file included from base64.c:34:
In file included from ./fko_common.h:149:
./fko_util.h:56:9: error: expected parameter declarator
size_t  strlcat(char *dst, const char *src, size_t siz);
        ^
/usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
  __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
                                           ^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
 #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                             ^
2013-11-12 21:36:14 -05:00
Michael Rash
5cfbcce7d3 [perl FKO module] added a series of encryption + HMAC key tests with single bytes converted to NULL 2013-10-30 23:39:48 -04:00
Michael Rash
6785462573 added perl FKO t/04_fuzzing.t tests file 2013-10-30 23:30:31 -04:00
Michael Rash
2f2156d54f [perl FKO module] additional fuzzing tests 2013-10-27 22:24:12 -04:00
Michael Rash
a98317d367 [test suite] minor negative output match addition for Test::Valgrind test 2013-10-27 15:08:01 -04:00
Michael Rash
0451a7394c [test suite] added valgrind output interpretation for Test::Valgrind output for previous run comparisons 2013-10-25 22:38:09 -04:00
Michael Rash
66f3c1236b [perl FKO module] added t/04_fuzzing tests 2013-10-24 23:17:51 -04:00
Michael Rash
55bceaddc8 [test suite] minor wording update for Test::Valgrind test 2013-10-22 23:05:36 -04:00
Michael Rash
b063bd5734 added Test::Valgrind note to the ChangeLog 2013-10-22 22:58:58 -04:00
Michael Rash
ceb213d545 [perl FKO] interim commit to update the perldoc info 2013-10-22 22:24:47 -04:00
Michael Rash
62939521ac [test suite] minor python update to use a main() function 2013-10-22 21:38:47 -04:00
Michael Rash
682966469c [test suite] minor Test::Valgrind name typo fix 2013-10-22 20:37:58 -04:00
Michael Rash
0d80f72c00 Revert "[test suite] minor Test::Valgrind name typo fix"
This reverts commit 642024041534d79c897a21b2e19ef3e1ed7b2a61.
2013-10-22 20:36:30 -04:00
Michael Rash
6420240415 [test suite] minor Test::Valgrind name typo fix 2013-10-22 16:18:46 -04:00
Michael Rash
b091a1a1bc [test suite, FKO module] new(), spa_data_final(), and other fcns don't require key length args 2013-10-22 14:39:45 -04:00
Michael Rash
e77a02882e [test suite] Add support for Test::Valgrind against the perl FKO module
When --enable-valgrind is used, this commit adds support for running the
perl FKO built-in tests (in the t/ directory) under the CPAN
Test::Valgrind module.  A check is performed to see whether
Test::Valgrind is install before attempting to use it.  Any 'fko_'
function that shows up under the test output is flagged and causes the
test-suite test to fail.
2013-10-22 14:11:23 -04:00
Michael Rash
431a5e3ecd [perl FKO module] switch to CBC mode tests from ECB 2013-10-11 11:04:49 -04:00
Michael Rash
ab0d5ac3e2 [test suite] display all possible tests under --list (with a --enable-* note) 2013-10-11 10:57:04 -04:00
Damien Stuart
0dc47f7e5c Fixed missing error codes and error tests. 2013-09-15 14:34:23 -04:00
Damien Stuart
a36bfab780 Merge branch 'perl_module' 2013-09-06 23:18:39 -04:00
Michael Rash
6daabaf3be minor ChangeLog typo update 2013-09-05 20:31:08 -04:00
Damien Stuart
1047146b23 Updated Perl FKO tests for lastest changes to libfko. Fixed bug where $fko->hmac() was always returning -1. 2013-09-04 15:19:43 -04:00
Michael Rash
85140f2048 Merge pull request #105 from fjoncourt/master
Make sure log_msg() sends messages to STDERR until the context gets initialized.
2013-08-28 21:55:39 -07:00
Franck Joncourt
5693b0536a Fixed *Value stored is never read* warning found by clang. 2013-08-27 20:45:17 +02:00
Franck Joncourt
69ed30edb4 Make sure all calls to log_msg() send messages to STDERR until the config files are parsed.
(mrash/fwknop#102)
2013-08-27 20:39:03 +02:00
Michael Rash
83952fc734 added Radostan Riedel's AppArmor policy note 2013-08-18 23:02:44 -04:00
Michael Rash
a5c308f9c5 Added AppArmor policy
This commit adds an AppArmor policy that is known to work in Debian and Ubuntu
systems.  The original version of this policy was contributed by Radostan Riedel
to the fwknop mailing list.
2013-08-18 22:58:10 -04:00
Michael Rash
a68503c7c9 [server] fix crash if replay digest tracking init() fails
This commit fixes a crash if the replay digest init() routine fails - fwknopd
attempted to make use of replay tracking anyway.  The crash was discovered
during testing fwknopd with an AppArmor enforce policy deployed.  The
following stack trace shows the crash (taken before the previous static
function commit):

 Program received signal SIGSEGV, Segmentation fault.
 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:31
 31      ../sysdeps/x86_64/multiarch/../strlen.S: No such file or directory.
 (gdb) where
 #0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:31
 #1  0x00007f59cabd8b26 in add_replay_file_cache (opts=opts@entry=0x7fff3eaa0bb0, digest=digest@entry=0x0) at replay_cache.c:516
 #2  0x00007f59cabd8cf5 in add_replay (opts=opts@entry=0x7fff3eaa0bb0, digest=digest@entry=0x0) at replay_cache.c:472
 #3  0x00007f59cabd62eb in incoming_spa (opts=0x7fff3eaa0bb0) at incoming_spa.c:536
 #4  0x00007f59ca56164e in ?? () from /usr/lib/x86_64-linux-gnu/libpcap.so.0.8
 #5  0x00007f59cabd7175 in pcap_capture (opts=opts@entry=0x7fff3eaa0bb0) at pcap_capture.c:269
 #6  0x00007f59cabd3d4d in main (argc=5, argv=0x7fff3eaa1458) at fwknopd.c:314
2013-08-18 22:19:41 -04:00
Michael Rash
5d49f30c01 [server] minor replay code update to make functions static where possible 2013-08-18 21:56:53 -04:00
Michael Rash
c271f01d00 [test suite] added 'make test' check for FKO perl module
All built-in tests in the FKO module must pass for this new test to pass.  This commit
is in support of #103
2013-08-17 23:51:31 -04:00
Damien Stuart
89c5e88219 First round of updates to get the Perl module up-to-date with the new libfko. Added new error refs and commented out bad/invalid tests. 2013-08-12 20:53:29 -04:00
Michael Rash
e8fe29bbe1 Merge branch 'master' of github.com:mrash/fwknop 2013-08-11 22:09:22 -04:00
Michael Rash
c0c8048ee1 Added fko context dumper change to ChangeLog, updated test suite to account for single line printing of final SPA data 2013-08-11 22:07:02 -04:00
Damien Stuart
12916f21ef Moved new invalid data error definitions above the GPGME_ERR_START marker. 2013-08-11 22:02:50 -04:00
Michael Rash
fa985c1943 Merge remote-tracking branch 'fjoncourt/fko_dump'
This implements an FKO context dumping function in lib/fko_utils.c, and closes #100
2013-08-11 15:02:01 -04:00
Michael Rash
45e29f6450 minor edit to credits file for Hank Leininger 2013-08-11 14:30:37 -04:00
Michael Rash
be2bb71c74 [test suite] minor bug fix for GPG no password HMAC test rc file 2013-08-10 21:03:07 -04:00
Michael Rash
5176f9e04b [server] minor addition to access stanza dump output to include hmac digest type 2013-08-10 16:08:19 -04:00