67 Commits

Author SHA1 Message Date
Damien Stuart
4fc9d05660 Tweaks for MINGW builds 2016-01-17 13:09:15 -05:00
Damien Stuart
e4fffdf44c Changes to fix the native Windows build. 2016-01-17 10:45:51 -05:00
Jonathan Bennett
83961750b3 Add ifdef for mingw compilation 2016-01-10 22:48:07 -06:00
Jonathan Bennett
a3e0d1cc1b clean up whitespace problems 2016-01-02 20:18:12 -06:00
Jonathan Bennett
9bb70fa17a Add Doxygen headers for common files 2016-01-01 03:02:17 +00:00
Jonathan Bennett
dda7fa39c1 Disable client side nat_dns 2015-12-31 19:24:45 +00:00
Jonathan Bennett
748803aef7 Add length checks for nat_access messages 2015-12-31 04:40:41 +00:00
Jonathan Bennett
bc55f0f21f Add count_characters and a CUnit test series for it. 2015-12-31 04:14:58 +00:00
Jonathan Bennett
56be13b3f6 Add dns resolution for nat access 2015-12-31 04:13:46 +00:00
Jonathan Bennett
d9f9cb8ad5 Add SHA3 and HMAC-SHA3 support 2015-12-30 20:32:52 +00:00
Michael Rash
a85b081f79 copyright update 2015-12-23 14:34:51 -05:00
Michael Rash
2fad399db3 promote hex_dump() to fko_util 2015-12-16 19:28:10 -08:00
Michael Rash
998fb96f0b promote argv handling functions to fko_util (avoids duplication across client and server) 2015-12-16 18:59:10 -08:00
Michael Rash
f230c32371 promote chop_* functions into fko_util 2015-12-16 18:00:57 -08:00
Damien Stuart
a4309ad768 Added clean up for .gcno and .gcda files (left went c-unit-tests are enabled. 2015-09-05 15:20:22 -04:00
Damien Stuart
2e60687dcf Merge branch 'master' into dstuart_refactor_autoconf 2015-08-29 12:46:24 -04:00
Michael Rash
416023723f minor #define addition 2015-07-11 21:28:56 -04:00
Michael Rash
ceb1713976 add --key-gen option to fwknopd (suggested by Jonathan Bennett) 2015-05-20 08:55:17 -07:00
Damien Stuart
e4fae829bc Refactor of Makefile.am files to fix issues caused by referencing source files in other directories - which broke make dist and make distclean targets. 2015-02-17 14:37:20 -05:00
Damien Stuart
b152d15970 Refactored how the cunit tests are processed so "make dist" does not fail and builds with c-unit-tests enabled work on systems with firewalld (added fw_util_firewalld.c for server tests). 2015-02-14 12:29:30 -05:00
Michael Rash
e8cfeaf772 Merge pull request #142 from fjoncourt/c_unit_testing
C unit testing - excellent, thank you Franck. I'll work on the relative path issue you mentioned as well.
2015-01-17 09:11:29 -05:00
Michael Rash
6b7a3bbdae [server] Add FORWARD_ALL access.conf wildcard
This is a significant commit that allows iptables firewalls to be used
as an "SPA gateway" for all ports/protocols upon providing a valid SPA
packet. Additional commits will be made to extend this capability, but
this commit adds two new access.conf keywords: FORWARD_ALL and
DISABLE_DNAT. These are used in conjunction to add ACCEPT rules for all
ports/protocols in the FORWARD chain, and also disable DNAT rules at the
same time. Then, by buildling the SNAT chain to provide translation for
an internal network (where an SPA cliet is located), but DROP all
forwarded traffic by default at the same time, SPA can be used to gain
access to the internet. So, this would allow, say, an RFC 1918 internal
network to have IP's assigned via DHCP but they wouldn't be able to
access the internet before sending a SPA packet to the gateway. This
scenario was suggested by spartan1833 to the fwknop list and tracked via
github issue 131.

Additional commits will be made to fully support this feature.
2015-01-17 08:38:32 -05:00
Franck Joncourt
1c81aef39d Fixed file permissions 2014-12-31 09:51:08 +01:00
Franck Joncourt
5c3a709014 Merge branch 'c_unit_testing' of https://github.com/fjoncourt/fwknop into c_unit_testing
Conflicts:
	client/config_init.c
	common/cunit_common.h
	lib/cunit_common.c
	server/access.c
2014-12-28 23:24:15 +01:00
Franck Joncourt
b7ecb3334a Merge upstream changes to our changes 2014-12-28 15:00:24 +01:00
Michael Rash
b5fe62bfc7 [test suite] command exec too many args tests 2014-10-26 16:58:13 -04:00
Michael Rash
837f7780fe [libfko] validate MAX_PORT integer value for SPA messages 2014-10-25 08:42:14 -04:00
Michael Rash
e271442aa9 [server] first cut at converting iptables commands to use execvpe() 2014-10-03 21:58:51 -04:00
Franck Joncourt
260cd5481b Use of init and cleanup functions for the test suite. 2014-09-07 20:33:39 +02:00
Franck Joncourt
bd0035af1e Fixed tab vs spaces 2014-09-07 15:40:03 +02:00
Franck Joncourt
32c5afae83 Merge remote-tracking branch 'upstream/master' into c_unit_testing 2014-09-07 15:24:59 +02:00
Franck Joncourt
688f08c2a0 Both the fwknop client and server have their own test suites tied to fwknop_utests
and fwknopd_utests binaries.

When profil coverage is enbaled, lcov filee are parsed by test-fwknop.pl and added
to the main profil coverage report in the output directory.

Running make from the main directory build the c-unit test suites if enabled.
2014-09-07 15:15:22 +02:00
Damien Stuart
73186e511a Added WIN32 definitions for popen (_popen) and pclose (_pclose) to accommodate the call to wget on Windows-based systems. 2014-08-30 16:18:46 -04:00
Franck Joncourt
306dd0f685 First layout to add c unit testing support to fwknop. 2014-08-24 21:05:44 +02:00
Michael Rash
6d1d66fe03 add --fault-injection-tag support to the client/server/libfko
This is a significant commit to add the ability to leverage libfko fault
injections from both the fwknop client and server command lines via a
new option '--fault-injection-tag <tag name>'.  This option is used by
the test suite with the tests/fault_injection.pl tests.
2014-06-05 23:05:49 -04:00
Michael Rash
ddaf0134d6 use fiu.h instead of fiu-local.h 2014-05-26 15:54:12 -04:00
Michael Rash
15aff82980 client/server added libfiu header files in --enable-libfiu-support mode 2014-05-26 08:39:44 -04:00
Michael Rash
4ba55d6814 fix automake subdir-objects warning on Mac OS X, fixes part of #115 2014-03-17 22:05:45 -04:00
Michael Rash
9e990c9be0 fix header non-ascii chars, and introduce test suite support for detecting this in source files 2014-03-14 09:14:35 -04:00
Michael Rash
bfdbb8f260 Updated authorship and copyright information
This commit updates all authorship and copyright information to include a
standard header that references the AUTHORS and CREDITS file. This standard
header was written by the Debian legal team at the request of Franck Joncourt.
2014-03-04 17:53:10 -05:00
Damien S. Stuart
4b0f0802ee Tweaks to unbreak the windows build: Renamed FD_SET macro to FD_SET_ALT to avoid conflict with the well-known FD_SET macro. Made the client read password from file descriptor a non-supported function on Windows. 2013-07-17 22:46:24 -04:00
Franck Joncourt
c2e1a00154 s/GNU Public/GNU General Public/g 2013-06-30 22:21:22 +02:00
Michael Rash
382099e85a Updated copyright dates, removed NEWS file in favor of the ChangeLog 2013-06-02 14:07:01 -04:00
Damien Stuart
15d9c6197b Fixes to get hmac_support and 2.5 changes working for the Windows lib and client builds. 2013-05-05 13:20:20 -04:00
Franck Joncourt
d93648cf99 Moved/Created proto_intostr() and proto_strtoint() to utils.c.
This allows to update dump_transmit_options() to use the log module to dump data.
2013-04-30 22:22:03 +02:00
Damien Stuart
6ecf81b16e First round if refactoring to clean up header dependencies. 2013-03-02 17:03:20 -05:00
Michael Rash
1afc8db96a Added strtol_wrapper() libfko utility function for atoi() replacement (#21)
This commit replaces most atoi() calls (which don't report errors) with a strtol()
wrapper function for stronger string -> integer conversion validation.
2013-02-18 19:32:53 -05:00
Michael Rash
47f20ea30c merged in the fixes_for_2.0.4 branch 2013-01-19 18:36:52 -05:00
Damien Stuart
e3c4c045c6 Changes to address header references, platform support, error messages, and the perl module test suite.
Rearranged headers to reduce duplication and remove local header
references from fko.h.
Removed references to headers that did not need to be explicitly set.
Moved the MAX_PROTO_STR_LEN and MAX_PORT_STR_LEN definitions to the
fko_limits.h file.
Fixed bug where invalid nat_access or command messages were returning
FKO_ERROR_INVALID_SPA_ACCESS_MSG error code instead of the one
appropriate to the message type.
Fixed bad nat_access_msg test in Perl module test suite (caught by new
validation code).
2012-12-01 11:06:41 -05:00
Damien Stuart
1ec9f4ae94 Re-tweaks for accommodating the windows build and systems that do not have strnlen 2012-11-30 23:40:24 -05:00