975 Commits

Author SHA1 Message Date
Michael Rash
280dbbfe10 added test for client --save-packet <file> argument 2013-02-12 23:26:08 -05:00
Michael Rash
ce18de4f84 make libfko pointers constant where possible 2013-02-12 22:39:39 -05:00
Michael Rash
4daedde364 updated untested function list for Linux systems 2013-02-12 22:18:16 -05:00
Michael Rash
67c09c8a1f Added test-coverage/README file 2013-02-12 22:08:42 -05:00
Michael Rash
f14fb4cb76 use same test execution strategy for --enable-profile-coverage-check as --enable-valgrind 2013-02-12 22:06:35 -05:00
Michael Rash
98ed91a36f updated ownership determination to use the test suite owner instead of the configure script 2013-02-11 23:17:52 -05:00
Michael Rash
67f92e7647 added the roadmap.org file 2013-02-10 15:04:33 -05:00
Michael Rash
381487569c added the roadmap.org file to define the upcoming fwknop road map 2013-02-10 15:01:06 -05:00
Michael Rash
b820bbbe4b Minor memory leak bug fix in --rotate-digest-cache mode
This commit fixes a minor memory leak for the digest cache file path in
--rotate-digest-cache mode in the replay_cache_init() function.  The leak was
caught by valgrind, and a new test was added to the test suite for it.  Here
is the valgrind warning:

==29021== 21 bytes in 1 blocks are definitely lost in loss record 2 of 2
==29021==    at 0x4C2B3F8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29021==    by 0x1103AA: replay_cache_init (replay_cache.c:96)
==29021==    by 0x10BB8C: main (fwknopd.c:254)
2013-02-10 14:57:44 -05:00
Michael Rash
7face3eec9 ensure matching test file comparison for valgrind test 2013-02-02 22:37:17 -05:00
Michael Rash
7bfaee9aef Make valgrind test fail for new flagged functions
In --enable-valgrind mode, this commit adds the ability to compare current test
result output with any previous test suite execution.  Whenever valgrind flags
a new function or if an existing flagged function has a greater number of
calls, then the final valgrind test will fail.  This allows a greater level of
valgrind validation to take place for new code in an automated fashion.  For
example, if a change to a piece of code introduces a memory handling problem of
the sort that valgrind can detect, then the final test will fail like so:

 # ./test-fwknop.pl --include "complete cycle.*HMAC" --enable-valgrind --test-limit 1

 [+] Starting the fwknop test suite...

     args: --include complete cycle.*HMAC --enable-valgrind --test-limit 1

     Saved results from previous run to: output.last/

 [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)...pass (1)
 [valgrind output] [flagged functions] ..............................fail (2)

 [+] 1/1/2 tests passed/failed/executed

The newly flagged functions will be written to the corresponding test file:

 # cat output/2.test

 [+] TEST: [valgrind output] [flagged functions]~
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: main
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: fko_spa_data_final
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: strdup
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: fko_new
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: fko_encrypt_spa_data
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: fko_encode_spa_data
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: fko_calculate_hmac
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: fko_set_username
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: fko_set_rand_value
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: fko_set_spa_message
 [-] 1.test (client) '[+] TEST: [Rijndael SPA] [client+server] complete cycle + HMAC (tcp/22 ssh)' --> NEW valgrind flagged function: set_digest
 [-] 1.test New and/or greater number of valgrind flagged function calls
2013-02-02 22:06:45 -05:00
Michael Rash
4824b74d93 bug fix for iptables duplicate rules test to account for rules that may have a different time stamp 2013-01-31 22:19:21 -05:00
Michael Rash
6d233a9427 make sure test message strings are unique across all tests 2013-01-31 21:20:04 -05:00
Michael Rash
c31c924a45 minor spacing fix 2013-01-30 21:13:44 -05:00
Michael Rash
13018a5c42 Merge pull request #19 from fjoncourt/hmac_support
Fixed gcc warning for the md5 driver.
2013-01-30 18:04:50 -08:00
Michael Rash
fa56f951b4 [test suite] bug fix for 'set_legacy_iv' mode in perl_fko_module_complete_cycle() 2013-01-29 21:57:38 -05:00
Michael Rash
f1793a61d6 Merge remote-tracking branch 'fjoncourt/hmac_support' into hmac_support
Applied fix from Franck Joncourt for the 'warning: dereferencing type-punned
pointer will break strict-aliasing rules [-Wstrict-aliasing]' error in the
MD5 digest code.
2013-01-29 21:52:15 -05:00
Franck Joncourt
fcf9f43c5b Fixed gcc warnings for the sha2 driver. 2013-01-28 21:47:57 +01:00
Michael Rash
efe6e9f23b more legacy IV mode tests with the perl FKO module 2013-01-27 22:22:52 -05:00
Michael Rash
4cb139c674 added fuzzing test counters with summary output 2013-01-27 20:37:48 -05:00
Michael Rash
2ecb278d8e added legacy IV tests for perl FKO client -> C server 2013-01-27 14:18:25 -05:00
Michael Rash
0109d64e54 added encryption_mode() support to perl FKO module 2013-01-27 14:03:26 -05:00
Michael Rash
b537c9e451 ensure test/conf/ files are included 2013-01-27 13:30:26 -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
8a5b700c30 openssl tests to use '-pass file:' method for setting passphrase 2013-01-27 10:54:20 -05:00
Michael Rash
98c16005da memset() AES buffers to zero 2013-01-27 10:53:07 -05:00
Michael Rash
1618dc2a7c minor typo spelling fix 2013-01-26 20:45:56 -05:00
Franck Joncourt
1a8520d659 Fixed gcc warning for the md5 driver.
md5.c: In function 'MD5Final':
md5.c:166:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
md5.c:167:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Debian Gnu/Linux on i386 build against 2.0.4 :

https://buildd.debian.org/status/fetch.php?pkg=fwknop&arch=i386&ver=2.0.4-1&stamp=1358610541
2013-01-26 22:23:18 +01:00
Michael Rash
1d35c33d52 [test suite] added --enable-openssl-checks
Added --enable-openssl-checks to send all SPA packets encrypted via libfko
through the OpenSSL library to ensure that the libfko usage of AES is always
compatible with OpenSSL.  This ensures that the fwknop usage of AES is properly
implemented as verified by the OpenSSL library, which is a frequently audited
high profile crypto engine.  If a vulnerability is discovered in OpenSSL and a
change is made, then the --enable-openssl-checks mode will allow the test suite
to discover this in a automated fashion for fwknop.
2013-01-25 21:44:24 -05:00
Michael Rash
e6e695bc2e minor todo.org updates 2013-01-22 22:47:40 -05:00
Michael Rash
fbbcae3a0d [libfko] Don't trundate > 16 byte Rijndael keys
Significant bug fix to honor the full encryption key length for
user-supplied Rijndael keys > 16 bytes long.  Previous to this bug fix,
only the first 16 bytes of a key were actually used in the encryption/
decryption process even if the supplied key was longer.  The result was
a weakening of expected security for users that had keys > 16 bytes,
although this is probably not too common.  Note that "passphrase" is
perhaps technically a better word for "user-supplied key" in this
context since Rijndael in CBC mode derives a real encryption/decryption
key from the passphrase through a series of applications of md5 against
the passphrase and a random salt.  This issue was reported by Michael T.
Dean.  Closes issue #18 on github.
2013-01-22 22:20:54 -05:00
Michael Rash
fde5ec8ed9 minor todo.org updates 2013-01-20 22:43:29 -05:00
Michael Rash
7d82b3ef30 minor ChangeLog and todo.org updates for the coming HMAC feature 2013-01-20 22:01:29 -05:00
Michael Rash
6c72e7a908 added test for b0a4c045e6862e4359fe6530934f456a2e61703d (ensure iptables rules not duplicated) 2013-01-20 18:51:34 -05:00
Michael Rash
fd41308ce5 added info for Franck's latest contribution 2013-01-20 15:31:55 -05:00
Michael Rash
b0a4c045e6 Merge remote-tracking branch 'fjoncourt/master' into hmac_support
This merges in code from Franck Joncourt to ensure that duplicate iptables
rules are not created for SPA packets that are themselves different but arrive
at the same time and that request exactly the same access.  This is done by
using the 'iptables -C' functionality to determine whether a duplicate rule
already exists before adding a new one.
2013-01-20 15:22:47 -05:00
Michael Rash
160a9e5565 perl FKO module HMAC compatibility 2013-01-20 14:27:27 -05:00
Michael Rash
47f20ea30c merged in the fixes_for_2.0.4 branch 2013-01-19 18:36:52 -05:00
Michael Rash
fc4825b331 added backwards compatibility test for 2.0.4 client->server 2013-01-19 18:17:29 -05:00
Michael Rash
437a05dac6 interim commit towards FKO compatibility with HMAC code 2013-01-19 16:27:34 -05:00
Michael Rash
307cb84323 port strlen bugfix 2013-01-18 22:11:32 -05:00
Michael Rash
47ea800889 merged in fwknop-2.0.4 changes 2013-01-18 17:25:16 -05:00
Franck Joncourt
0fda88cfca * Avoid duplicate rules with the same timestamp. 2013-01-17 21:46:13 +01:00
Damien Stuart
ecc9a62a23 Add AM_CPPFLAGS to common/Makefile.am 2013-01-13 22:28:34 -05:00
Damien Stuart
b7b4e857be Change to how strlcpy and strlcat are handled
Put strlcpy and strlcat object files back in the source group in lib.
Moved libfko_util.a to the common directory (though sources remain in
lib).  Client and server code looks to common dir for libfko-util.
This fixes issue with strlcpy showing as undefined symbol when perl FKO
module is loaded.
2013-01-13 22:16:30 -05:00
Damien Stuart
10c19063df Fixed parallel build issue
Added explicit dependency directives to Makefile.am to address errors
when running a parallel build.
2012-12-23 10:28:30 -05:00
Michael Rash
516b75f41c removed openbsd/pkg/ directory 2012-12-13 21:09:47 -05:00
Michael Rash
0d19065ecc added fwknop-2.0.4 OpenBSD port from Vlad Glagolev 2012-12-13 21:07:53 -05:00
Michael Rash
0e89efb40e moved openbsd/* to openbsd/fwknop-2.0.3/ now that Vlad Glagolev has contributed an fwknop-2.0.4 OpenBSD port 2012-12-13 21:05:31 -05:00
Michael Rash
92b648a08f updated ChangeLog.git file for fwknop-2.0.4 changes 2012-12-09 15:55:59 -05:00