158 Commits

Author SHA1 Message Date
Michael Rash
836370d034 [client] minor tab->spaces fix 2014-10-04 10:32:52 -04:00
Florian Schüller
dc30f162c7 Add "NO_SAVE_ARGS" to initial config file 2014-10-01 14:28:36 +02:00
Florian Schüller
981d1f7077 Support for "--no-save-args" in .fwknoprc 2014-10-01 14:28:29 +02: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
eb0e8eb6a1 fwknopd man page updates for access.conf vars 2014-08-26 23:21:14 -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
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
764d9ca26d fix gcc -Wstrlcpy-strlcat-size warnings 2014-07-19 16:30:53 -04: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
b243bb4bb7 [client] fix minor memory leak before exit() in parsing invalid time offsets 2014-04-11 22:45:27 -04:00
Michael Rash
f539afc750 [client] make is_rc_param() error condition fatal 2014-04-10 20:48:05 -04:00
Michael Rash
c6cb892a05 [test suite] more client/config_init.c test coverage 2014-04-06 22:14:10 -04:00
Michael Rash
a65324bad1 [client] return error exit status if --stanza-list cannot open the rc file 2014-04-04 23:02:09 -04:00
Michael Rash
956199a3cb [client] minor typo fix for -P requirement under spoofed src mode 2014-04-03 22:52:11 -04:00
Michael Rash
73bc473563 [client+server] verify GnuPG signatures by default
- [server] When GnuPG is used, the default now is to require that
incoming SPA packets are signed by a key listed in GPG_REMOTE_ID for each
access.conf stanza. In other words, the usage of GPG_REQUIRE_SIG
is no longer necessary in order to authenticate SPA packets via the
GnuPG signature. Verification of GnuPG signatures can be disabled with a
new access.conf variable GPG_DISABLE_SIG, but this is NOT a
recommended configuration.
- [client+server] Add --gpg-exe command line argument and GPG_EXE
config variable to ~/.fwknoprc and the access.conf file so that the path
to GnuPG can be changed from the default /usr/bin/gpg path.
2014-03-25 19:53:13 -04:00
Michael Rash
5baf8a3fa9 replace malloc() with calloc() calls 2014-03-15 22:02:57 -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
ad512ff6e7 [test suite] added Rijndael+HMAC SPOOF_SRC fwknoprc file test 2014-03-13 21:43:51 -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
Michael Rash
c382febf3d [client] use libfko is_valid_ipv4_addr() for IP address validation 2013-11-26 23:48:56 -05:00
Franck Joncourt
04f72ea724 * Fixed typos. 2013-07-30 23:00:19 +02:00
Franck Joncourt
ccee56b998 * A bit more of documentation. 2013-07-30 21:49:33 +02:00
Franck Joncourt
4c478c1bb6 * Added a new --stanza-list command line to fwknop to dump the stanzas
configured in ./fwknoprc. The default stanza is not displayed.
2013-07-30 21:38:54 +02:00
Michael Rash
65dc33dd9c [client] added --use-hmac to --help output (noticed by Damien) 2013-07-18 23:06:24 -04: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
Michael Rash
1b524f8104 [client] make legacy encryption mode and HMAC usage mutually exclusive 2013-07-08 23:06:57 -04:00
Michael Rash
1e77f6ed53 continued changes to zero out sensitive information before exit (#93) 2013-07-07 22:32:30 -04:00
Franck Joncourt
c2e1a00154 s/GNU Public/GNU General Public/g 2013-06-30 22:21:22 +02:00
Franck Joncourt
47a7ffe22b Merge remote-tracking branch 'upstream/master' 2013-06-25 23:03:28 +02:00
Michael Rash
047513710a [client] add GPG_NO_SIGNING_PW to --save-rc-stanza functionality 2013-06-20 22:11:42 -04:00
Franck Joncourt
afd6f6b23c Interim commit to add a VERBOSE variable to fwknopd. 2013-06-20 23:33:04 +02:00
Michael Rash
68acbaadc4 remove newline chars from log_msg() calls 2013-06-19 23:42:58 -04:00
Michael Rash
13173343ee [client] add GPG_ALLOW_NO_SIGNING_PW and --gpg-no-signing-pw
This change brings similar functionality to the client as the GPG_ALLOW_NO_PW
keyword in the server access.conf file.  Although this option is less likely
to be used than the analogous server functionality, it stands to reason that
the client should offer this feature.  The test suite has also been updated to
not use the --get-key option for the 'no password' GPG tests.
2013-06-18 22:51:22 -04:00
Michael Rash
056fd44c24 [commit] default --verbose rc handling to bool Y/N values, but allow integers too when --verbose is given multiple times 2013-06-09 15:58:22 -04:00
Michael Rash
66399fed1a Merge remote-tracking branch 'fjoncourt/master'
Closes #74 - allows a passphrase to be read from STDIN or from a file descriptor
via --fd.
2013-06-02 22:54:23 -04:00
Franck Joncourt
583e1e02c7 Merge remote-tracking branch 'upstream/master'
Conflicts:
	client/config_init.c
2013-06-02 21:54:25 +02:00
Franck Joncourt
9fce10abd8 Adding support for reading encryption/key password from a file descriptor.
* Added tests to the test suite.
 * Updated the usage message.
 * Fixed the password functions.

reference : mrash/fwknop#74
2013-06-02 21:36:17 +02:00
Michael Rash
382099e85a Updated copyright dates, removed NEWS file in favor of the ChangeLog 2013-06-02 14:07:01 -04:00
Franck Joncourt
f3af0d48c5 Interim commit to be able to load key from file descriptor (fd 0 for example). 2013-06-01 23:14:56 +02:00
Michael Rash
9b2cd9e2e5 [client] allow -D to be used in --save-rc-stanza mode if -n is not given
This change simplifies the fwknop client usage by allowing the -D argument to
be used as the stanza name if -n is not also specified in --save-rc-stanza
mode.
2013-05-31 23:01:47 -04:00
Michael Rash
0504627c2e [client] don't print keys to stdout in --save-rc-stanza --key-gen mode
This is a minor commit to not print keys to stdout when both --save-rc-stanza
and --key-gen are set on the command line.
2013-05-30 22:03:11 -04:00
Franck Joncourt
6d9f840ab7 The -R command line switch is now handled in fwknoprc as RESOLVE_IP_HTTP variable. 2013-05-29 14:06:57 +02:00
Franck Joncourt
cf6cb01f67 Fixed ask_overwrite(). Generated keys are now stored in fwknoprc.
* ask_overwrite() : when the user inputs more than one char when prompted,
   a second call to the function does not take the second char anymore.
   We parse all of the chars until we reach an LF char and discard all of them
   except the first one.
   The overwrite is requested only when the user sets 'y', if there is anything
   else we asssume 'N'.

 * When -k is used on the command line along with the --save-rc-stanza, the
   generated keys are also written in the stanza in fwknoprc.
2013-05-29 12:19:56 +02:00
Franck Joncourt
82caa9a6a9 The variables are now stored in a hash (variable name and position) rather than
an array containing only their name. It is now possible to sort them without
 worrying about their position in the enumeration.

Improve variable naming for a better understanding (var_ndx becomes var_pos).
2013-05-28 17:14:36 +02:00
Franck Joncourt
dedc4bc8aa Interim commit to handle bitmask with more than 32 positions. 2013-05-27 18:18:47 +02:00
Franck Joncourt
cc07d10d73 Set command line argument bitmask as a 64-bits value to be able to handle more arguments.
Interim commit to add the VERBOSE variable to be stored in the fwknoprc file when
 -v is used with --save-rc-stanza. The VERBOSE variable is also read by fwknop
 and the verbosity level is set accordingly.
2013-05-25 21:56:01 +02:00
Michael Rash
52462e7dba Use {0} initializer for all stack allocated char arrays
Lots of places in the code were already using {0} to initialize stack char
arrays, but memset() was being used as well.  This commit removes all
unnecessary memset() calls against char arrays that are already initialized
via {0} (which sets all members to zero for such arrays).
2013-05-21 22:00:15 -04:00
Franck Joncourt
98e631451f Fixed stanza name in log message. We display the stanza we were looking for, not the current one. 2013-05-20 21:58:18 +02:00
Franck Joncourt
5e3d9b6e0b Do not assume two rc sections are separated by an empty line. (mrash/fwknop#81) 2013-05-19 22:00:51 +02:00
Franck Joncourt
6c59c9ade8 Merge remote-tracking branch 'upstream/master' 2013-05-19 15:34:20 +02:00