Martin Willi
ed9bdfee41
scepclient: Cast OID_UNKNOWN before comparing it to unsigned hash_algorithm_t
...
clang uses unsigned enums and complains about the always-false -1 check.
2014-05-16 15:42:07 +02:00
Martin Willi
78db68cecf
swanctl: Properly initialize return value of --install command
2014-05-16 15:42:07 +02:00
Martin Willi
f5bbbd480c
xauth-pam: Fix header include guard
2014-05-16 15:42:07 +02:00
Martin Willi
2cf5e97dd2
eap-peap: Remove dead SoH code from PEAP
...
clang complains about the unused variables.
2014-05-16 15:42:07 +02:00
Martin Willi
e2bf45a491
tls: Move variable sized tls_record_t struct to end of tls_t data
...
clang complains about the the non-last variable length member.
2014-05-16 15:42:07 +02:00
Martin Willi
6eff96f543
kernel-klips: Pass a pointer to a properly sized integer for algorithm lookup
2014-05-16 15:42:07 +02:00
Martin Willi
e163427d9f
auth-cfg: Cast literal default value to pointer type
...
Fixes a clang warning.
2014-05-16 15:42:07 +02:00
Martin Willi
0746e38c51
unbound: Explicitly cast from ldns RR type/class to our types
...
These definitions are directly derived from the RFC, so it should be safe
to cast them. clang complains about the different types, so cast them
explicitly.
2014-05-16 15:42:06 +02:00
Martin Willi
fb515325cc
x509: Remove some unused ASN1 OID constants
2014-05-16 15:42:06 +02:00
Martin Willi
d3cf9ca322
aes: Remove unused build variants
...
The AES code historically has different build options for various size/speed
trade-offs. We never made use of them, so just drop the obsolete code. The code
now has four hard-coded fixed tables, both inverse and original.
2014-05-16 15:42:06 +02:00
Tobias Brunner
b3dd0168f1
settings: Properly match } and # in include statements
...
Found due to %option nodefault. A match for } was actually missing
and # was not properly matched if it was part of an include statement
on the last line of a file that did not end with a newline.
2014-05-15 12:03:07 +02:00
Tobias Brunner
c92d44f2cf
settings: Eliminate performance warning
...
This was useful during development, but we accept that matching \n together
with %option yylineno impacts performance.
2014-05-15 12:03:07 +02:00
Tobias Brunner
4102fc9c09
parser-helper: Define debug macros depending on DEBUG_LEVEL
2014-05-15 11:28:10 +02:00
Tobias Brunner
66248396c6
parser-helper: Make parser_helper_file_t private
2014-05-15 11:28:10 +02:00
Tobias Brunner
c976cc7d33
parser-helper: Make parser_helper_log a function
2014-05-15 11:28:10 +02:00
Tobias Brunner
4b670a20a9
settings: strongswan.conf must be loaded explicitly
2014-05-15 11:28:10 +02:00
Tobias Brunner
da45f9e994
settings: Replace deprecated YYLEX_PARAM with %lex-param
...
With Bison 3.x support for YYLEX_PARAM has been removed and %lex-param
should be used. Unfortunately, that option does not take expressions.
Instead we use a wrapper function that calls the lexer with the proper
scanner object, which should also be backward compatible to older Bison
versions.
2014-05-15 11:28:09 +02:00
Tobias Brunner
813e510d69
settings: Include generated header after others
...
Newer Bison versions declare the parser function in the header, which
requires custom types.
2014-05-15 11:28:09 +02:00
Tobias Brunner
f65ac98c64
settings: Reduce log verbosity if files can't be opened
...
Basically reintroducing 2a38b4556e .
2014-05-15 11:28:09 +02:00
Tobias Brunner
8b43c9ba34
settings: Adopt the new order of sections and settings when replacing configs
2014-05-15 11:28:09 +02:00
Tobias Brunner
5ac20cbb87
settings: Only purge sections if necessary
...
Instead of removing and caching all values of a previous config, we only
do this for actually removed sections/settings.
2014-05-15 11:28:08 +02:00
Tobias Brunner
f5dd274ab8
settings: Maintain order of sections and settings while enumerating
2014-05-15 11:28:08 +02:00
Tobias Brunner
2fbbea55c5
settings: Don't overwrite values in-place
...
This is not thread safe. If threads are reading from pointers to existing
values they could get a partially updated invalid value.
Refactored assignment to a separate function.
2014-05-15 11:28:08 +02:00
Tobias Brunner
725c479f8b
settings: Add functions to add sections and key/value pairs to a section
2014-05-15 11:28:07 +02:00
Tobias Brunner
2fe04fb312
unit-tests: Update settings tests to match new parser
...
Empty settings are now ignored, strings are supported, newlines are
handled properly (e.g. at the end of files) etc.
2014-05-15 11:28:07 +02:00
Tobias Brunner
3855dc01ec
settings: Don't enumerate key/value pairs with NULL value
2014-05-15 11:28:07 +02:00
Tobias Brunner
47a3ed979b
settings: Use generated parser instead of our own
2014-05-15 11:28:07 +02:00
Tobias Brunner
073d72cf49
settings: Optionally keep track of removed/replaced values
2014-05-15 11:28:06 +02:00
Tobias Brunner
1f669078ac
settings: Add flex/bison based parser for strongswan.conf
...
This parser features several improvements over the existing one.
For instance, quoted strings (with escape sequences), unlimited includes,
relaxed newline handling (e.g. at the end of files or before/after { and }),
and the difference between empty and unset values (key = vs. key = "").
It also complains a lot more about invalid syntax. The current one accepts
pretty odd stuff (like settings or sections without name) without any
errors or warnings.
2014-05-15 11:28:06 +02:00
Tobias Brunner
f99d1f7ba5
settings: Extract section and key/value pair types and helper functions
...
This allows us to use them in the upcoming parser.
2014-05-15 11:28:06 +02:00
Tobias Brunner
3cb8016f0e
parser-helper: Add utility class for flex/bison based parsers
2014-05-15 11:28:06 +02:00
Tobias Brunner
3784633fa5
settings: Use glob enumerator to load included files
2014-05-15 11:28:06 +02:00
Tobias Brunner
96de74b879
enumerator: Add enumerator to enumerate files matching a pattern
...
This enumerator is a wrapper around glob(3). If that function is not
supported NULL is returned. If no files match or an error occurs during
the pattern expansion an error is logged and the enumerator simply returns
no items.
RFC: if GLOB_ERR is not supplied glob returns GLOB_NOMATCH if e.g. the
base directory of the pattern does not exist, which would otherwise
result in an error. This way there is at least a clear error message in
case of a typo.
2014-05-15 11:28:05 +02:00
Tobias Brunner
b9b1114ab1
settings: Move to a separate folder
2014-05-15 11:28:05 +02:00
Tobias Brunner
8069b3b14b
array: Allocate initial data properly if esize is 0
2014-05-15 11:28:05 +02:00
Martin Willi
e20e0a0586
swanctl: Increase default debug level to 1
...
We initially intended to silence debugging only during thread initialization,
not for swanctl in general.
2014-05-14 16:28:01 +02:00
Martin Willi
80b56fb468
vici: Support the close_action keyword, as we have it documented
2014-05-14 16:26:53 +02:00
Martin Willi
cdc42256b0
ikev1: Fix debugging log when remote traffic selector selection fails
2014-05-14 10:01:57 +02:00
Andreas Steffen
fa34739848
result destructor at the wrong level
2014-05-14 09:43:54 +02:00
Andreas Steffen
60633a995f
build-database.sh finds all *.so files in /usr/lib
2014-05-13 10:08:04 +02:00
Andreas Steffen
7207e3a7ea
Defined BIOS and EFI event types and log event info
...
On debug level 2 log EV_ACTION and EV_EFI_ACTION strings
and on level 3 dump raw event information
2014-05-13 06:21:28 +02:00
Tobias Brunner
f1a272a0d0
libpts: Updated Android.mk
2014-05-12 11:46:08 +02:00
Andreas Steffen
8d59090349
Implemented PT-EAP protocol (RFC 7171)
2014-05-12 06:59:21 +02:00
Andreas Steffen
ab21875f50
Extended build-database.sh
2014-05-12 06:55:29 +02:00
Andreas Steffen
37a73b9cc7
attest now maintains multiple versions of a file hash
2014-05-10 20:08:20 +02:00
Andreas Steffen
688b5b99ed
Changed default value to libimcv.imc-attestation.pcr_info = no
2014-05-10 20:08:20 +02:00
Martin Willi
b1b01840b6
child-sa: Reclaim old state if SA updating is not supported
...
If the state stays at UPDATING, the fallback using IKEv1 rekeying fails as
the task manager refuses to rekey a CHILD_SA in non-INSTALLED state.
2014-05-09 08:49:08 +02:00
Martin Willi
b1076bc8fd
swanctl: By default print local swanctl version with --version
...
But add a --daemon option to query the IKE daemon for its version.
2014-05-07 15:48:17 +02:00
Martin Willi
92884b4683
swanctl: Install empty credential folders with appropriate permissions
2014-05-07 15:48:17 +02:00
Martin Willi
2230f18358
swanctl: Document most swanctl.conf options in manpage
2014-05-07 15:48:17 +02:00