Commit Graph

12921 Commits

Author SHA1 Message Date
Andreas Steffen 6b6b857cb6 Updated strongSwan SWID Tag from ISO 2009 to 2014 format 2014-05-31 20:37:55 +02:00
Andreas Steffen e2c9f6ce04 Version bump to 5.2.0dr5 2014-05-31 20:37:26 +02:00
Tobias Brunner b2b54bd71d Make sure getpass() is available
It's not on Android for example.
2014-05-29 12:28:53 +02:00
Tobias Brunner 95d13fcc3f starter: Fix build on Android
While the (default) ipsec script does not work on Android starter still
passes the script's name to charon if leftfirewall is configured.
2014-05-28 18:20:42 +02:00
Andreas Steffen 58c639e584 Some more files to measure 2014-05-21 14:00:31 +02:00
Andreas Steffen ba6c27f063 Added all SWID tables and example regids 2014-05-21 14:00:31 +02:00
Tobias Brunner e34905ce7b scripts: Ignore settings-test script 2014-05-20 18:56:43 +02:00
Martin Willi b9dd46d8a9 peer-cfg: Add missing UNIQUE_NEVER to unique_policy_names 2014-05-19 18:05:51 +02:00
Tobias Brunner b9dfeb5de4 unit-tests: Sync threads with main thread in test_cleanup_cancel()
Without synchronization threads could get canceled before they could
disable their cancelability.
2014-05-19 16:06:52 +02:00
Tobias Brunner 403ad5dd85 pfkey: Always include stdint.h
On some systems (e.g. on Debian/kFreeBSD) that header is required when
including ipsec.h, on Linux we require it too when including pfkeyv2.h,
so to simplify things we just always include it.
2014-05-19 14:53:24 +02:00
Tobias Brunner 89b0845e7f Merge branch 'fetcher-response-code'
Extends the fetcher API to retrieve the response status code for a request.
2014-05-19 14:32:53 +02:00
Tobias Brunner 271c2dd24e soup: Add support to retrieve the response code 2014-05-19 14:29:48 +02:00
Tobias Brunner 350c1dead9 unit-tests: Allow some HTTP write operations to fail
Because CURLOPT_FAILONERROR is enabled in the curl plugin an error code
will often (not always) cause the client to close the TCP connection
before the server has written the complete response.
2014-05-19 14:28:45 +02:00
Tobias Brunner 703a0b4c3e curl: Add support to return the response code 2014-05-19 14:28:40 +02:00
Tobias Brunner deb8975bd2 unit-tests: Add a test case for HTTP response codes 2014-05-19 14:24:12 +02:00
Tobias Brunner 9a18593752 fetcher: Add option to retrieve response code from a fetcher 2014-05-19 14:20:50 +02:00
Tobias Brunner 032dcb8989 unit-tests: Defer failures by worker threads
In some cases the main thread is not ready to immediately call siglongjmp(),
e.g. if it currently holds a mutex that is later required during
shutdown.

Therefore, we delay handling errors in worker threads until the main
thread performs the next check itself (or the test function ends).

The same issue remains with SIGALRM.
2014-05-19 14:06:55 +02:00
Tobias Brunner 435fecd751 unit-tests: Make sure plugins in the builddir are loaded
When running the tests in GDB the working directory apparently is
different.  With the relative path used previously the plugins would not
be found and those installed on the system would get used.
2014-05-19 14:06:43 +02:00
Tobias Brunner 7c888e0d23 unit-tests: Don't assert failures for unreadable settings files as root
The file can still be read by root even if nobody has read privileges.
2014-05-16 17:50:29 +02:00
Martin Willi 2145f0c212 Merge branch 'aead-proposal'
Encode default AEAD encryption algorithms to a proposal separate from non-AEAD
algorithms. RFC 4306 and 5282 where less explicit, but RFC 5996 requires
separate proposals for AEAD and non-AEAD algorithms. As responder we still
accept both encoding variants.

Fixes #573.
2014-05-16 16:54:04 +02:00
Martin Willi 2f893f278d proposal: Don't return a default IKE proposal without encryption/AEAD algs 2014-05-16 16:51:19 +02:00
Martin Willi 8d74ec9e80 ike: Add an additional but separate AEAD proposal to CHILD config
This currently has no effect: We don't include AEAD algorithms in the default
ESP proposal, as we don't know if it is supported by the backend. But as we
hopefully get an algorithm query mechanism on kernel interfaces some day, we
add the appropriate functionality nonetheless.
2014-05-16 16:51:19 +02:00
Martin Willi 879e3d12ca ike: Add an additional but separate AEAD proposal to IKE config, if supported 2014-05-16 16:51:19 +02:00
Martin Willi 356846db5d child-cfg: Allow passing NULL as proposal to add_proposal()
Making the API consistent to the one of ike_cfg.
2014-05-16 16:01:21 +02:00
Martin Willi 3312c447ef ike-cfg: Allow passing NULL to add_proposal()
This simplifies adding default proposals with constructors potentially
returning NULL.
2014-05-16 16:01:21 +02:00
Martin Willi 8642f8bdb7 proposal: Use an additional "default" constructor specific to AEAD algorithms
This allows a caller to create a separated proposal for supported AEAD
algorithms, as required by RFC 5996.
2014-05-16 16:01:21 +02:00
Martin Willi 0fc4dd429d proposal: Don't include AEAD algorithms in the default proposal
According to RFC 5996 3.3 we should use a separate proposal for AEAD algorithms.
This was not clear in RFC 5282, hence we previously included both AEAD and
non-AEAD algorithms in a single proposal.
2014-05-16 16:01:21 +02:00
Martin Willi 9612db648a Merge branch 'clang-fixes'
Fixes some warnings raised when compiling with clang. Some are cosmetically,
others are worth to fix.

This prepares the Travis build for -Werror, which will force us to fix all
warnings raised by all compilers.
2014-05-16 15:45:41 +02:00
Martin Willi 064fe9c963 enum: Return boolean result for enum_from_name() lookup
Handling the result for enum_from_name() is difficult, as checking for
negative return values requires a cast if the enum type is unsigned. The new
signature clearly differentiates lookup result from lookup value.

Further, this actually allows to convert real -1 enum values, which could not
be distinguished from "not-found" and the -1 return value.

This also fixes several clang warnings where enums are unsigned.
2014-05-16 15:42:07 +02:00
Martin Willi 9ee8b3b41f enum: Don't directly include enum.h
To allow enum.h to depend on utils.h definitions, avoid its direct inclusion.
Instead include utils.h, which includes enum.h as well.
2014-05-16 15:42:07 +02:00
Martin Willi 8584e62368 libtps: Silence GCC set-but-unused warning in incomplete code 2014-05-16 15:42:07 +02:00
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
Andreas Steffen 0f000cdd6c Minor changes in the test environment 2014-05-15 21:30:42 +02:00
Tobias Brunner ff4a2acbe6 Merge branch 'settings-parser'
Adds a flex/bison based parser for settings_t.  It provides several
improvements over the previous parser e.g. quoted strings (with escape
sequences), unlimited includes, more relaxed newline handling, better
syntax error reporting, and a distinction between empty and unset
values (key = vs. key = "").
2014-05-15 12:15:16 +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 5b64c04046 scripts: Add test script for settings_t 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