Commit Graph

80 Commits

Author SHA1 Message Date
Michael Rash
d2abbd8720 [test suite] more code coverage tests 2014-10-25 22:29:49 -04:00
Michael Rash
17608dd01d [test suite] additional code coverage 2014-10-25 08:42:30 -04:00
Michael Rash
58d47cb385 [test suite] additional code coverage for a few areas 2014-10-24 20:39:40 -04:00
Michael Rash
56a6b7dee5 give firewalld its own namespace (can track firewalld changes independently of iptables) 2014-10-21 22:43:21 -04:00
Michael Rash
0af8faa0b3 Merge branch 'udp_listener' into execvpe 2014-10-13 20:25:14 -04:00
Michael Rash
00b229b834 [test suite] detect firewalld vs. iptables for server rewrite conf tests 2014-10-13 19:54:30 -04:00
Michael Rash
d9fb29318e [test suite] add --exit-parse-config to fwknopd basic tests where possible 2014-10-12 21:29:44 -04:00
Michael Rash
ed9e1ac236 added setgid() call for command execution along with CMD_EXEC_GROUP access.conf var 2014-10-07 16:18:14 -04:00
Michael Rash
e2c2ad141e TCP/UDP server port validation tests 2014-09-28 22:06:06 -04:00
Michael Rash
360905ec56 implement --packet-limit for UDP server mode 2014-09-28 21:19:19 -04:00
Michael Rash
50434c5c4c Use the fwknop User-Agent for wget SSL external IP resolutions
Bug fix to ensure that a User-Agent string can be specified when the
fwknop client uses wget via SSL to resolve the external IP address. This
closes issue #134 on github reported by Barry Allard. The fwknop now
uses the wget '-U' option to specify the User-Agent string with a
default of "Fwknop/<version>". In addition, a new command line argument
"--use-wget-user-agent" to allow the default wget User-Agent string to
apply instead.
2014-09-27 23:23:12 -04:00
Michael Rash
b06447384e [client] have autoconf resolve the absolute path to wget for SSL IP resolution 2014-07-27 22:03:58 -04:00
Michael Rash
4fcd5b317a [server] fix shift operation bug in SOURCE subnet processing spotted by Coverity 2014-07-26 23:43:48 -04:00
Michael Rash
59718f1a36 [client] Updated IP resolution mode -R to use SSL
External IP resolution via '-R' (or '--resolve-ip-http') is now done via SSL by
default. The IP resolution URL is now 'https://www.cipherdyne.org/cgi-gin/myip',
and a warning is generated in '-R' mode whenever a non-HTTPS URL is specified
(it is safer just to use the default). The fwknop client leverages 'wget' for
this operation since that is cleaner than having fwknop link against an SSL
library.
2014-07-25 17:42:06 -04:00
Michael Rash
73490209f7 [test suite] add access.conf file path to a few basic tests 2014-07-22 17:36:31 -04:00
Michael Rash
7e1346c49a [test suite] add variable expansion and fwknopd override tests 2014-07-08 16:31:06 -05:00
Michael Rash
1b47173906 [test suite] add SYSLOG_FACILITY tests 2014-07-07 21:35:27 -05:00
Michael Rash
5474ced90b [test suite] extend invalid sniff interface test to include promisc mode 2014-07-05 23:10:26 -05:00
Michael Rash
77eb1a763f [test suite] add invalid sniff interface test 2014-07-05 22:44:40 -05:00
Michael Rash
a2ff2a396c [server] call clean_exit() upon check_dir_path() error 2014-07-03 10:31:30 -04:00
Michael Rash
5ced103207 [test suite] minor test coverage addition for invalid locale setting 2014-07-03 10:17:52 -04:00
Michael Rash
43b770320a [server] Require sig ID's or fingerprints when sigs are validated
When validating access.conf stanzas make sure that one of
GPG_REMOTE_ID or GPG_FINGERPRINT_ID is specified whenever GnuPG
signatures are to be verified for incoming SPA packets. Signature
verification is the default, and can only be disabled with
GPG_DISABLE_SIG but this is NOT recommended.
2014-06-30 11:52:42 -04:00
Michael Rash
a65fff7e7b [test suite] make fko_wrapper binary path absolute 2014-05-22 08:30:36 -05:00
Michael Rash
84821438bd [test suite] started on support for libfiu fault injection tests 2014-05-20 21:20:10 -04:00
Michael Rash
55582c31f8 [test suite] expand libfko username coverage testing by adding undef LOGNAME env variable test 2014-05-10 23:16:32 -04:00
Michael Rash
2b5029a4ee [test suite] add SIGINT, SIGUSR1, and SIGUSR2 signals to restart cycle test for code coverage 2014-05-09 07:49:57 -04:00
Michael Rash
16b3911091 [test suite] Rijndael HMAC fuzzing support and a few minor test additions 2014-05-08 07:25:47 -04:00
Michael Rash
d7e9ae578b [test suite] add digest cache rewrite feature for test coverage, add config line and pcap filter validation tests 2014-05-04 09:16:39 -04:00
Michael Rash
5f24fc8c5f [server] add --dump-serv-err-codes for test coverage 2014-05-02 22:59:05 -04:00
Michael Rash
fb21e3a575 [server] bug fix to handle SPA packets via http 2014-04-29 23:25:31 -04:00
Michael Rash
6dde30bc91 [test suite] significant test coverage update
This commit adds a lot of test coverage support as guided by gcov +
lcov.

Also added the --no-ipt-check-support option to fwknopd (this is only
useful in practice on older Linux distros where 'iptables -C' is not
available, but it helps with test coverage).
2014-04-29 20:54:01 -04:00
Michael Rash
67dd1d5bdd [server] bug fix to allow IP-formatted masks for SOURCE lines in access.conf 2014-04-12 15:21:00 -04:00
Michael Rash
b243bb4bb7 [client] fix minor memory leak before exit() in parsing invalid time offsets 2014-04-11 22:45:27 -04:00
Michael Rash
b422f1b9a7 [test suite] implement new fwknopd access/fwknopd.conf file writing feature similar to client rc file writing/testing 2014-04-10 23:10:11 -04:00
Michael Rash
55d1ee3fd9 [test suite] --key-* arg validation with --fd 0 2014-04-09 23:56:50 -04:00
Michael Rash
0ff2100993 [test suite/client] memory leak bug fix and test coverage
This commit fixes a minor memory leak in the fwknop client before
calling exit() when an abnormally large number of command line arguments
are given.  The leak was found with valgrind together with the test
suite (specifically the 'show last args (4)' test):

==23748== 175 bytes in 50 blocks are definitely lost in loss record 1 of 1
==23748==    at 0x4C2C494: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==23748==    by 0x1112F1: run_last_args (fwknop.c:991)
==23748==    by 0x110D36: prev_exec (fwknop.c:916)
==23748==    by 0x10D953: main (fwknop.c:170)

Additional test coverage was added for the client via the
basic_operations.pl tests.
2014-04-08 21:12:46 -04:00
Michael Rash
e5169d0878 [test suite] env HOME tests, -R http resolve tests 2014-04-08 11:15:53 -04:00
Michael Rash
d9c1eb8f51 [test suite] more client/config_init.c test coverage 2014-04-07 22:31:56 -04:00
Michael Rash
5da38165ef [test suite] KEY_FILE and HMAC_KEY_FILE tests 2014-04-06 22:21:14 -04:00
Michael Rash
c6cb892a05 [test suite] more client/config_init.c test coverage 2014-04-06 22:14:10 -04:00
Michael Rash
5176cd0976 [test suite] additional test coverage for client/config_init.c 2014-04-06 21:27:15 -04:00
Michael Rash
4d63644ce7 [test suite] additional test coverage for client/config_init.c 2014-04-06 15:42:22 -04:00
Michael Rash
710720b237 [test suite] non-default stanza digest update test 2014-04-05 23:09:04 -04:00
Michael Rash
e95d601a48 [test suite] added --key-gen -K file path too long test 2014-04-05 21:51:56 -04:00
Michael Rash
48eb5fcc94 [test suite] added key file path too long tests 2014-04-05 21:29:24 -04:00
Michael Rash
d0d77ba67f [test suite] added rc file path too long test 2014-04-05 08:19:20 -04:00
Michael Rash
1ec1443768 [test suite] add several validation tests to exercise various client/config_init.c lines 2014-04-04 23:03:03 -04:00
Michael Rash
b8492d4319 [test suite] added --key-rijndael and --key-hmac tests 2014-04-03 22:52:53 -04:00
Michael Rash
2da2704d4c [test suite] fwknoprc GPG tests, more time offset tests 2014-04-03 19:30:58 -04:00
Michael Rash
e4a382a87f [test suite] save pkt to file tests 2014-04-03 10:04:52 -04:00