398 Commits

Author SHA1 Message Date
Michael Rash
371036bad0 [client] re-use encryption/HMAC keys in --test mode
The client --test mode decrypts SPA packet data as a final step, but get_keys()
was being called to re-acquire the encryption/HMAC keys.  This commit reuses
the same keys that were supplied for SPA packet encryption/authentication
because the most important code to test is not get_keys() but rather libfko
encryption/decryption/authentication operations.
2013-06-21 21:08:41 -04:00
Michael Rash
6b132862fd [client] minor man page backwards compatibility wording tweak 2013-06-20 22:12:29 -04: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
e3a2289d70 [client] man page update to include GPG_SIGNING_PW synonym for KEY variable in GPG mode 2013-06-19 23:37:19 -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
afbf6d51c0 [client] minor man page backwards compatibility update to include better examples 2013-06-16 08:27:29 -04:00
Michael Rash
48b2213780 [client] truncate args save file with open() 2013-06-13 21:20:11 -04:00
Michael Rash
a3e06966b5 [client] minor man page wording update for backwards compatibility section 2013-06-10 21:14:09 -04:00
Michael Rash
46dadecf5a [client] minor man page tweak to use rc VERBOSE bool value (which is the default now) 2013-06-09 16:00:46 -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
dbfa2579a7 [client] minor man page tweak 2013-06-09 15:57:16 -04:00
Franck Joncourt
e515ba45fe Merge remote-tracking branch 'upstream/master'
Conflicts:
	client/fwknop.8.in
2013-06-05 21:47:41 +02:00
Franck Joncourt
7dec26852a Updated fwknop manpage to document both the use of stdin and fd commands. 2013-06-05 21:38:26 +02: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
Michael Rash
1b41e606a7 Added backwards compatibility section to the client man page
Added backwards compatibility section and new material on a 'quick start'
subsection for the EXAMPLES section.
2013-06-02 13:51:25 -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
9cbb80d434 update man page in client/server directories to the latest 2013-05-31 21:36:49 -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
cfbbac2654 man page updates - access.conf section now includes variable guidance 2013-05-21 22:10:13 -04: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
05585cab8a Merge remote-tracking branch 'upstream/master' 2013-05-20 22:02:31 +02: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
Michael Rash
e31459bb1e updated client and server man page material 2013-05-19 14:12:58 -04:00
Franck Joncourt
6c59c9ade8 Merge remote-tracking branch 'upstream/master' 2013-05-19 15:34:20 +02:00
Michael Rash
0a279ccbfc [client] minor --verbose display update to say source port is 'OS assigned' when not otherwise set 2013-05-18 22:49:38 -04:00
Michael Rash
96bbf7e61a [client] bug fix to separate out --named-config vs. --no-save-args command line args 2013-05-18 22:36:13 -04:00
Michael Rash
23a354fced [client+server] ensure HMAC key and encryption passphrase are not the same 2013-05-18 12:10:18 -04:00
Michael Rash
731ca0e038 [client] added warning in --verbose mode if -s is used instead of -a or -R 2013-05-18 10:51:49 -04:00
Franck Joncourt
cee5807deb First draft to be able to use stdin as an input for submitting fwknop key.
mrash/fwknop#74
2013-05-18 10:54:44 +02:00
Michael Rash
45244114f8 [client] --key-gen bug fix to print keys to stdout 2013-05-17 21:03:16 -04:00
Franck Joncourt
bb90a8bf75 Fixed gcc warnings on openbsd. - mrash/fwknop#60 2013-05-14 22:08:44 +02:00
Franck Joncourt
9dbb62ae1e Merge remote-tracking branch 'upstream/master' 2013-05-13 16:30:27 +02:00
Michael Rash
c555a35489 [client] set ctx=NULL after fko_destroy() calls 2013-05-12 20:54:04 -04:00
Franck Joncourt
160c21d6b6 Rewrite enc_mode_inttostr() and enc_mode_strtoint().
Make sure both functions works the same way and refer to the same
encryption mode string.

Updated the fwknop usage message to display the encryption mode.
2013-05-12 16:52:52 +02:00
Michael Rash
add518016c [client] removed unnecessary array NULL check found by Coverity 2013-05-09 22:10:38 -04:00
Michael Rash
8c09d38941 various sizeof() usage and type bug fixes found by Coverity 2013-05-09 21:17:27 -04:00
Michael Rash
9f9bbcbcdd fixed several resource leak conditions found by Coverity 2013-05-09 17:15:58 -04:00
Michael Rash
8d980ae686 remove dead code caught by Coverity 2013-05-07 23:02:49 -04:00