Commit Graph

85 Commits

Author SHA1 Message Date
Michael Rash
509dcf93dd [android] added HMAC test along with non-legacy Rijndael test 2013-12-23 23:15:11 -05:00
Michael Rash
aeed8323f7 [test suite] multi-packet pcap test for pcap_dispatch() validation
This commit adds a new pcap file to the test suite with an SPA packet after
99 other garbage packets.  This can be used for pcap_dispatch() testing,
though this is not meant to be super instensive - it is just to ensure that
if a PCAP_DISPATCH_COUNT of, say, 10 is selected that the SPA is still seen
by fwknopd.  This commit is in support of #110.
2013-12-10 21:56:20 -06:00
Michael Rash
0319b72334 [test suite] added missing config files 2013-12-05 23:01:12 -05:00
Michael Rash
c04efc20dd [test suite] added Rijndael HMAC digest mismatch tests 2013-08-10 15:45:51 -04:00
Michael Rash
dfc2a06547 [test suite] added Rijndael HMAC + RAND_PORT test 2013-08-10 14:27:10 -04:00
Michael Rash
4775327d98 [test suite] added two GnuPG HMAC SHA512 tests 2013-08-10 13:54:03 -04:00
Michael Rash
05e7d52a5f [client] merged --stanza-list changes from Franck, closes #94 2013-08-08 20:54:07 -04:00
Michael Rash
870a08c9f5 [test suite] added invalid IPT input chain specification tests 2013-08-04 21:22:35 -04:00
Michael Rash
0200169dfd [test suite] started on SNAT tests 2013-08-03 13:36:32 -04:00
Franck Joncourt
836921a9ea * Added new test to validate --stanza-list 2013-07-30 22:54:10 +02:00
Michael Rash
dac75c0242 [server] restore backwards compatibility for Rijndael keys > 16 bytes in legacy mode by truncating (upgrading recommended of course) 2013-07-14 15:37:24 -04:00
Michael Rash
13626a2a74 [test suite] added tests for KEY synonym GPG_SIGNING_PW 2013-06-19 23:41:37 -04:00
Michael Rash
0c19e5170a [test suite] added backwards compatibility tests with a dual usage key in access.conf 2013-06-10 21:16:33 -04:00
Michael Rash
88e1e0e099 [test suite] added tests for setting gpg recipient, signer, and homedir via the client rc file 2013-06-09 15:27:19 -04:00
Michael Rash
7a1bdea514 [server] fix 'Use of untrusted string value' bug found by Coverity
This commit changes iptables policy parsing to re-use rule_exists() for fwknop
jump rule detection instead of using sscanf() against iptables policy list
output.  Also, fwknop jump rules are now deleted from iptables policies in a
loop to ensure all are removed even if there are duplicates (even though this
should not happen under normal circumstances anyway).
2013-06-09 14:28:17 -04:00
Michael Rash
164888e075 [test suite] added backwards compatibility test for truncated keys longer > 16 chars 2013-06-02 21:19:19 -04:00
Michael Rash
47d235f4fe [test suite] minor formatting update to access.conf files to mimic fwknoprc vars (no colon or trailing semicolon) 2013-05-21 22:12:03 -04:00
Michael Rash
fad0ef8690 [test suite] added 'equal keys' files 2013-05-19 16:15:19 -04:00
Michael Rash
3246c3c6b0 [test suite] added hmac_get_key_access.conf file 2013-05-12 22:30:28 -04:00
Michael Rash
d61d5b964e [test suite] added Cygwin client compatibility tests 2013-05-03 23:17:24 -04:00
Michael Rash
56ef34738e [test suite] add new test files to Makefile.am 2013-05-02 15:08:04 -04:00
Michael Rash
0f24877762 [test suite] minor comment addition so this isn't a zero-byte file 2013-05-01 08:21:11 -04:00
Michael Rash
486f0ea52f [test suite] restore gpg directories after test suite runs 2013-04-27 22:41:17 -04:00
Franck Joncourt
b04de687ce Fixed hostname resolution while spoof ip is used.
mrash/fwknop#64
2013-04-27 23:31:40 +02:00
Michael Rash
5e82adbf3f [test suite] added GPG password required HMAC tests, added --disable-valgrind argument 2013-04-23 21:56:41 -04:00
Michael Rash
4ea683678b [test suite] added gpg_no_pw_hmac_access.conf file 2013-04-22 20:59:32 -04:00
Michael Rash
6c1b755bea [test suite] removed unnecessary comment lines from test config files 2013-04-20 15:31:26 -04:00
Michael Rash
387b6e40d3 [test suite] updated non-based64 keys in non-base64 key files 2013-04-20 11:09:48 -04:00
Michael Rash
f010d88016 removed trailing semicolon from KEY value 2013-04-19 19:42:06 -04:00
Michael Rash
05ced0a514 add HMAC_KEY variable support to access.conf (alternative to HMAC_KEY_BASE64) 2013-04-08 22:14:06 -04:00
Michael Rash
748715acf8 [test suite] added python->C HMAC test 2013-04-08 20:45:14 -04:00
Michael Rash
4bdb71315a [client] --nat-rand-port bug fix
Bug fix for --nat-rand-port mode to ensure that the port to be
NAT'd is properly defined so that the fwknopd server will NAT
connnections to this port instead of applying the NAT operation to the
port that is to be accessed via -A.  This change also prints the
randomly assigned port to stdout regardless of whether --verbose mode is
used (since it not then the user will have no idea which port is
actually going to be NAT'd on the fwknopd side).
2013-03-16 14:38:20 -04:00
Michael Rash
55d188ed1f [test suite] added HMAC key tests 2013-03-12 22:18:43 -04:00
Michael Rash
402a545cb2 convert standard hmac access.conf file for HMAC SHA512 to use key size of 128 bytes 2013-03-11 23:12:56 -04:00
Michael Rash
bd2af22691 [test suite] set HMAC_DIGEST_TYPE to md5 for HMAC MD5 test 2013-03-10 21:58:52 -04:00
Michael Rash
22dde8eb35 SPA with HMAC SHA256 and SHA384 now works
This is a fairly significant commit that lays the groundwork for getting
selectable HMAC modes working for both the client and server.  One libfko API
change was required so that the hmac_type is passed into fko_new_with_data().
This allows the server to set the hmac_type via access.conf stanzas.  The
effort in this commit will be extended to allow HMAC MD5, SHA1, and SHA512
also function properly.
2013-03-10 14:26:05 -04:00
Michael Rash
7fe5c55fcf [test suite] added various hmac verification conf files 2013-03-08 21:10:45 -05:00
Michael Rash
44d05a6916 interim commit for supporting multiple HMAC digest types (# 45) 2013-03-07 23:14:48 -05:00
Michael Rash
39ca73a245 [test suite] added OpenSSL HMAC verification (closes #39) 2013-03-05 23:29:46 -05:00
Michael Rash
5c182c1722 [test suite] added HMAC dual usage test 2013-03-03 16:21:46 -05:00
Michael Rash
1de684ab16 [test suite] minor spacing fix for hmac_access.conf file 2013-03-02 11:15:19 -05:00
Michael Rash
6a475bbe54 Continued atoi() replacement with strtol() wrapper (issue #21)
This commit replaces a few additional atoi() calls with the strtol() wrapper
function, and also fixes a bug where access SOURCE IP/mask combinations would
not be accepted when the string length was a long as something like
'123.123.123.123/255.255.255.255'.
2013-02-18 22:22:44 -05:00
Michael Rash
e7eb02f82d Maintain backwards compatibility with old "zero padding" code
[libfko] Added the ability to maintain backwards compatibility with the
now deprecated "zero padding" strategy in AES mode that was a hold over
from the old perl fwknop implementation.  This enables the backwards
compatiblity tests to continue to pass in the test suite.
2013-01-27 13:18:29 -05:00
Michael Rash
1618dc2a7c minor typo spelling fix 2013-01-26 20:45:56 -05:00
Michael Rash
47ea800889 merged in fwknop-2.0.4 changes 2013-01-18 17:25:16 -05:00
Michael Rash
9921e72d70 [test suite] backwards compatibility tests
Added a few backwards compatibility tests for versions of fwknop going back to
2.0, and also added a compatibility test for an SPA packet produced by Android
4.2.1.
2012-11-15 21:16:11 -05:00
Michael Rash
66ad134708 [server] Added '--pcap-file <file>' option
Added a new '--pcap-file <file>' option to allow pcap files to
be processed directly by fwknopd instead of sniffing an interface.  This
feature is mostly intended for debugging purposes.
2012-11-08 21:33:23 -05:00
Michael Rash
5c1979e16a Added test suite config file: disable_aging_nat_fwknopd.conf 2012-11-04 22:13:52 -05:00
Michael Rash
231be81f5b bug fix to include multi-gpg ID no password test 2012-11-03 23:11:24 -04:00
Michael Rash
66741b3d81 Added a test for SPA over TCP 2012-10-04 21:05:55 -04:00