398 Commits

Author SHA1 Message Date
Franck Joncourt
d8090a8143 Allowed an fwknoprc stanza (-n) to be overriden by arguments from the command line.
Added a sanity check to make sure the -n option is used with the --save-rc-stanza option.
2013-03-18 22:06:31 +01:00
Michael Rash
c7b5611fa4 Merge remote-tracking branch 'fjoncourt/hmac_support' into hmac_support
Significant merge from Franck Joncourt to add the ability to save command line
args to ~/.fwknoprc stanzas.  This merge is in support of #4.

Conflicts:
	lib/fko_util.c
	lib/fko_util.h
2013-03-17 21:34:23 -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
253ccb7cea added encryption type/mode and message type string representations for FKO context diplay output 2013-03-14 22:26:44 -04:00
Franck Joncourt
b9046df64d Remove useless comment. 2013-03-14 22:39:36 +01:00
Franck Joncourt
212075094c Added the possibility to parse only sedction in a fwknoprc file and
not only the whole file - more.
2013-03-14 22:16:37 +01:00
Franck Joncourt
366536055f Added the possibility to parse only sedction in a fwknoprc file and not only the whole file 2013-03-13 07:13:50 +01:00
Michael Rash
02d0255a7c update base64 key char arrays to use MAX_B64_KEY_LEN macro 2013-03-11 22:55:00 -04:00
Michael Rash
6478d2b892 minor fix to remove extraneous memset() call 2013-03-11 22:54:10 -04:00
Michael Rash
70c17be916 added MAX_B64_KEY_LEN for full length SHA512 keys 2013-03-11 22:50:02 -04:00
Franck Joncourt
977ee18c3f New function bool_to_yesno. 2013-03-10 20:55:19 +01:00
Michael Rash
7821e83dfc Merge branch 'hmac_support' of github.com:mrash/fwknop into hmac_support
Conflicts:
	client/fwknop.c
	lib/fko_hmac.c
2013-03-10 14:32:07 -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
Damien Stuart
6fa3be393c Renamed fko_set_hmac_type to fko_set_spa_hmac_type. Incorporated libfko changes and additions to the fko python module code. 2013-03-10 13:21:24 -04:00
Franck Joncourt
8a2bc732b7 Fixed data format for some arguments in fwknoprc when they are saved. 2013-03-10 18:17:08 +01:00
Michael Rash
6f45b2c3b1 added HMAC SHA384 and SHA512 support, bug fix to allow shorter HMAC key lengths than associated digest block size 2013-03-09 23:27:08 -05:00
Franck Joncourt
c5163fcc24 Added new parameters HMAC_DIGEST_TYPE to the save capability. 2013-03-09 12:39:05 +01:00
Franck Joncourt
c2ef7f224a Moved static functions from the client to the fko_util.c file. 2013-03-09 12:17:17 +01:00
Franck Joncourt
469f9a5f39 Merge remote-tracking branch 'upstream/hmac_support' into hmac_support
Conflicts:
	client/cmd_opts.h
	client/config_init.c
2013-03-09 11:54:45 +01: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
Franck Joncourt
053db37c0d Added more command line switches in order for the user to be able to specify the Rijndael, Rijndael base64 and HMAC key. 2013-03-05 21:01:38 +01:00
Michael Rash
1dc47f80d8 Fix byte order warning
This commit fixes a byte order warning for both sha1.c and md5.c like so:

sha1.c:127:6: warning: #warning Undetermined or unsupported Byte Order... We will try LITTLE_ENDIAN [-Wcpp]

Also removed a couple of header includes that appear not be needed.
2013-03-03 14:29:08 -05:00
Franck Joncourt
38a803fb71 * Added KEY, KEY_BASE64 and HMAC_KEY_BASE64 definitions to the save capability.
* Allowed section to be found during an update of fwknoprc even if there are somes spaces before the stanza.
* Allowed the user to strike the ENTER key to overwrite the section as it will be done with the 'Y' char.
2013-03-03 18:41:31 +01:00
Michael Rash
b86e48dd66 remove a couple of unnecessary header includes 2013-03-02 23:16:26 -05:00
Damien Stuart
f9e1ae4859 Merge my working branch 'hmac_support' into hmac_header_fixes 2013-03-02 17:22:50 -05:00
Damien Stuart
6ecf81b16e First round if refactoring to clean up header dependencies. 2013-03-02 17:03:20 -05:00
Michael Rash
73b1931bd8 minor clean up for get_keys() base64 decoded key length 2013-02-28 22:25:04 -05:00
Michael Rash
ffcb77552b Remove lib/fko.h dependency on rijndael.h 2013-02-28 21:47:43 -05:00
Franck Joncourt
e38fb835d0 Added save capability for a specific stanza in fwknoprc. 2013-02-28 22:53:08 +01:00
Michael Rash
5b00d1756f set fko_ctx_t opaque pointers to NULL 2013-02-20 21:20:09 -05:00
Michael Rash
a413c6cf94 Continue atoi() replacement with strtol() wrapper, closes issue #21
This commit completes the conversion to the strtol() wrapper function in order
to remove all atoi() calls.  In addition, variable max values are enforced
using more broadly defined RCHK_* values.
2013-02-19 23:11:01 -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
7735e8ce7a minor comment typ fix 2013-02-17 12:02:48 -05:00
Michael Rash
aab3ba3b0c added --save-args-file and corresponding tests to the fwknop client 2013-02-14 22:50:14 -05:00
Michael Rash
47f20ea30c merged in the fixes_for_2.0.4 branch 2013-01-19 18:36:52 -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
Damien Stuart
5f598bbf7f Added Les Aker's changes: Look for glibtoolize if libtoolize is not available (for Macs). Added USE_GPG_AGENT option for .fwknoprc 2012-12-09 12:30:43 -05:00
Damien Stuart
39410044c5 Set new libfko version. Client: allow dot (.) in validate_username, and display version and exit without creating an fko context. 2012-12-07 11:38:31 -05:00
Damien Stuart
bcea440b87 Limited exported symbols in libfko to only the public (fko_) functions. Moved strlcat/cpy to a separate libfko_util lib. 2012-12-02 09:56:57 -05:00
Damien Stuart
617305504a Revert "Tweaks to EXTRA_DIST. Added one missing and removed one invalid entry under the test directory."
This reverts commit 556ca2c146a598cddada4dd8cdf3f9b12f32f202.
2012-11-19 12:19:12 -05:00
Damien Stuart
f544a4aeb5 Added the --icmp-xxxx arg descriptions to the fwknop usage message. 2012-11-19 09:48:34 -05:00
Damien Stuart
556ca2c146 Tweaks to EXTRA_DIST. Added one missing and removed one invalid entry under the test directory. 2012-11-19 09:30:15 -05:00
Damien Stuart
f499e30900 Tweaks to fix issues with building the lib and client under Windows. Added .fwknop.last support on Windows. Bumped the lib version to 0.0.4. Fixed bug in username detection code. Removed -Werror from AM_INIT_AUTOMAKE which prevented setting of CPPFLAG for the lib build in some circumstances. 2012-11-19 08:43:14 -05:00
Michael Rash
2a3cd1abfe Merge branch 'master' of github.com:mrash/fwknop 2012-11-08 22:25:33 -05:00
Michael Rash
03b222ddda [client] (Franck Joncourt) Fixed Ctrl-C problem where SPA packets were sent anyway
[client] (Franck Joncourt) Contributed a patch to allow the fwknop
client to be stopped during the password entry prompt with Ctrl-C before
any SPA packet is sent on the wire.
2012-11-08 22:22:04 -05:00
Damien Stuart
5ddf5afec6 Ignore trailing whitespace on .fwknoprc directives 2012-11-08 19:41:46 -05:00
Michael Rash
627035fb22 Patch from Franck Joncourt for setting permissions via open()
[client+server] Applied patch from Franck Joncourt to remove unnecessary
chmod() call when creating client rc file and server replay cache file.
The permissions are now set appropriately via open(), and at the same
time this patch fixes a potential race condition since the previous code
used fopen() followed by chmod().
2012-10-23 21:47:56 -04:00
Michael Rash
e4751d1c20 added icmp type/code blurb 2012-10-11 23:40:04 -04:00