310 Commits

Author SHA1 Message Date
Michael Rash
2247dfeab8 use execvpe() with NULL env for wget calls 2014-10-03 11:39:33 -04:00
Michael Rash
b1358d564d minor client --help update 2014-10-03 11:35:38 -04: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
e1608b90fe [client] call freeaddrinfo() early after iterating through getaddrinfo() results 2014-07-22 22:35:43 -04:00
Michael Rash
666d150aff [client] make close() on socket handle more intuitive (resolves 'double close' bugs flagged by Coverity) 2014-07-22 22:04:44 -04:00
Michael Rash
7df1186c66 fixed several socket handle leaks under error conditions spotted by Coverity 2014-07-22 11:30:33 -04:00
Michael Rash
764d9ca26d fix gcc -Wstrlcpy-strlcat-size warnings 2014-07-19 16:30:53 -04:00
Michael Rash
53a1e1bc00 [client] minor bug fix for condition under which fiu_* functions are called for fault injection 2014-06-08 20:19:03 -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
02ed5f5ad4 [server] add --exit-parse-config option, man page updates (minor formatting change) 2014-05-04 09:17:27 -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
b97484734e [client] fix memory leak introduced in 0ff210099 2014-04-10 23:18:44 -04:00
Michael Rash
4b86edbbe2 [client] ensure to call fko_destroy() on the correct context if encryption mode could not be determined 2014-04-10 23:07:39 -04:00
Michael Rash
f539afc750 [client] make is_rc_param() error condition fatal 2014-04-10 20:48:05 -04:00
Michael Rash
0ff2100993 [test suite/client] memory leak bug fix and test coverage
This commit fixes a minor memory leak in the fwknop client before
calling exit() when an abnormally large number of command line arguments
are given.  The leak was found with valgrind together with the test
suite (specifically the 'show last args (4)' test):

==23748== 175 bytes in 50 blocks are definitely lost in loss record 1 of 1
==23748==    at 0x4C2C494: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==23748==    by 0x1112F1: run_last_args (fwknop.c:991)
==23748==    by 0x110D36: prev_exec (fwknop.c:916)
==23748==    by 0x10D953: main (fwknop.c:170)

Additional test coverage was added for the client via the
basic_operations.pl tests.
2014-04-08 21:12:46 -04:00
Michael Rash
d327f99efb [client] minor typo fix 2014-04-08 21:06:18 -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
2da2704d4c [test suite] fwknoprc GPG tests, more time offset tests 2014-04-03 19:30:58 -04:00
Michael Rash
d4c696d24a [client] minor update to comment out unused function 2014-04-03 19:27:44 -04:00
Michael Rash
ef0eb18fd3 [client] removed unused hex_dump() function 2014-03-29 14:04:09 -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
0bae1a5a1b started on 2.6.1 ChangeLog entries 2014-03-09 19:16:36 -04:00
Michael Rash
08e5c9252c [client] bug fix to set non-zero random source port for UDP raw SPA mode 2014-03-09 19:08:40 -04:00
Michael Rash
be971e2ec8 [client] bug fix to convert UDP length header field to network byte order in UDP raw mode 2014-03-09 18:58:22 -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
d79fcea6d7 [client] minor bug fix to add --spoof-source synonym for --spoof-src to match man page 2014-01-17 21:10:36 -05:00
Michael Rash
551b243007 (Marek Wrzosek) Update docs to reflect random 'digits' use instead of 'bytes'
Suggested doc update to fwknop man pages to accurately describe the usage
of digits instead of bytes for SPA random data.  About 53 bits of entropy
are actually used, although this is in addition to the 64-bit random salt
in for key derivation used by PBKDF1 in Rjindael CBC mode.
2014-01-02 20:47:41 -05:00
Michael Rash
c382febf3d [client] use libfko is_valid_ipv4_addr() for IP address validation 2013-11-26 23:48:56 -05:00
Michael Rash
196fef65b6 [libfko] move is_base64 check to libfko
This commit replaces the separately implemented client/server
is_base64() check with a single libfko function, and libfko itself now
uses it as well before prepending Rijndael or GnuPG base64 encoded
prefixes.
2013-11-16 19:20:08 -05:00
Michael Rash
63568d061b minor hex_dump() formatting bug fix to properly align ascii remainder output 2013-11-15 14:53:04 -05:00
Franck Joncourt
f8ae3b8da3 Merge remote-tracking branch 'upstream/master' into fko_dump 2013-08-10 14:32:34 +02:00
Michael Rash
eb7914d45c minor ChangeLog update for --stanza-list 2013-08-08 21:37:44 -04:00
Franck Joncourt
7296d3f3bf * Interim commit to add a dump function to dump the FKO context shared
by both the server and client. mrash/fwknop#95
2013-08-05 23:28:07 +02: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
ea9d6a0fdc [client] apply patch from Ilya Tumaykin for terminal setting type
This commit also fixes a 'possible use of uninitialized value' warning from gcc for
the old_c_lflag variable.
2013-07-24 22:44:08 -04:00
Damien Stuart
5ec4998aaa Reset terminal setting to orignal values after entering keys via stdin 2013-07-24 14:39:26 -04:00
Michael Rash
65dc33dd9c [client] added --use-hmac to --help output (noticed by Damien) 2013-07-18 23:06:24 -04:00
Michael Rash
3ee8b47870 [client] fix minor memory leak in getpasswd() routine caught by the test suite in valgrind mode 2013-07-18 17:30:25 -04:00
Michael Rash
f2d829535b [client] fix minor compilation warning about an unused variable 2013-07-18 00:15:22 -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