Commit Graph

16026 Commits

Author SHA1 Message Date
Andreas Steffen d35183e33e Version bump to 5.6.0rc2 2017-08-09 14:23:28 +02:00
Andreas Steffen e658fd475a sw-collector: Moved info class to libimcv 2017-08-09 13:28:00 +02:00
Tobias Brunner f237bfcb9e NEWS: Added some news 2017-08-08 20:05:30 +02:00
Tobias Brunner e66c3d41bc conf: Descriptions of several settings updated 2017-08-08 17:28:01 +02:00
Tobias Brunner eb3239b921 libimcv: Cast chunk length to int when printing as string 2017-08-08 15:32:08 +02:00
Tobias Brunner cbade9b6b9 sw-collector: Cast chunk length to int when printing as string 2017-08-08 15:31:56 +02:00
Tobias Brunner 0392f76804 sw-collector: Fix memory leak after failing to open DB 2017-08-08 15:30:44 +02:00
Tobias Brunner d093488b96 sw-collector: Use correct variable to report failure to open history file 2017-08-08 15:29:41 +02:00
Tobias Brunner 3abb6a231d Revert "apidoc: Update Doxyfile"
This reverts commit 8ec979fd64.

Mainly because Travis is still on Trusty and this generates lots of
warnings.
2017-08-07 18:29:51 +02:00
Andreas Steffen 285c077d2c Version bump to 5.6.0rc1 2017-08-07 18:25:52 +02:00
Andreas Steffen 3295b35c6a imv-database: Improve performance by creating file_hashes index 2017-08-07 17:43:54 +02:00
Tobias Brunner e64cdb15c5 sw-collector: Add missing Doxygen group
Fix location of two classes.
2017-08-07 17:37:00 +02:00
Tobias Brunner 5d65aad8a6 libimcv: Add missing Doxgen group for SWIMA-related classes
Fix location of swima_error_t.
2017-08-07 17:36:48 +02:00
Tobias Brunner 8ec979fd64 apidoc: Update Doxyfile 2017-08-07 17:27:31 +02:00
Tobias Brunner ca280574ba Fixed some typos, courtesy of codespell 2017-08-07 17:22:01 +02:00
Tobias Brunner c11d13c4b9 testing: Add -v option to do-tests to prefix commands with timestamps 2017-08-07 16:55:45 +02:00
Tobias Brunner f058804df8 testing: Move collector.db in tnc/tnccs-20-ev-pt-tls scenario to /etc/db.d
Also move initialization to the pretest script (it's way faster in the
in-memory database).
2017-08-07 16:55:45 +02:00
Tobias Brunner 6fadc6a859 kernel-netlink: Wipe buffer used to read Netlink messages
When querying SAs the keys will end up in this buffer (the allocated
messages that are returned are already wiped). The kernel also returns
XFRM_MSG_NEWSA as response to XFRM_MSG_ALLOCSPI but we can't distinguish
this here as we only see the response.

References #2388.
2017-08-07 16:55:40 +02:00
Tobias Brunner 1a75514b76 sha2: Write final hash directly to output buffer
This avoids having the last output in internal memory that's not wiped.

References #2388.
2017-08-07 16:55:33 +02:00
Tobias Brunner e0c78d7516 prf-plus: Wipe seed and internal buffer
The buffer contains key material we handed out last and the seed can
contain the DH secret.

References #2388.
2017-08-07 16:55:28 +02:00
Eyal Birger 32e5c49234 child-sa: Allow requesting different unique marks for in/out
When requiring unique flags for CHILD_SAs, allow the configuration to
request different marks for each direction by using the %unique-dir keyword.

This is useful when different marks are desired for each direction but the
number of peers is not predefined.

An example use case is when implementing a site-to-site route-based VPN
without VTI devices.

A use of 0.0.0.0/0 - 0.0.0.0/0 traffic selectors with identical in/out marks
results in outbound traffic being wrongfully matched against the 'fwd'
policy - for which the underlay 'template' does not match - and dropped.

Using different marks for each direction avoids this issue as the 'fwd' policy
uses the 'in' mark will not match outbound traffic.

Closes strongswan/strongswan#78.
2017-08-07 14:22:27 +02:00
Tobias Brunner 00498d78a8 conf: Match more characters in _ and **
\w does not match e.g. / but \S does.
2017-08-07 14:22:27 +02:00
Tobias Brunner 1a8226429a trap-manager: Don't require that remote is resolvable during installation
Initiation might later fail, of course, but we don't really
require an IP address when installing, that is, unless the remote
traffic selector is dynamic. As that would result in installing a
0.0.0.0/0 remote TS which is not ideal when a single IP is expected as
remote.
2017-08-07 14:22:13 +02:00
Tobias Brunner 7bcd48d1b1 child-create: Don't log CHILD_SA initiation until we know the unique ID 2017-08-07 14:22:13 +02:00
Tobias Brunner 663b749c9f child-rekey: Add CHILD_SA name and unique ID to collision log messages 2017-08-07 14:22:13 +02:00
Tobias Brunner 859dae255c child-sa: Suppress CHILD_SA state changes if there is no change 2017-08-07 14:22:13 +02:00
Tobias Brunner 11ddda2ecd Merge commit 'child-sa-rekey-tkm'
This fixes CHILD_SA rekeying with TKM and changes how we switch to the
outbound IPsec SA with Netlink/XFRM (using SPIs on the outbound policy
instead of installing the outbound SA delayed).

For charon-tkm it changes when esa_select() and esa_reset() are called,
now with the outbound policy and the inbound SA, respectively, instead
of the outbound SA in both cases.

Also fixed is a potential traffic loss when a rekey collision is lost.
2017-08-07 10:46:45 +02:00
Tobias Brunner 772957778c charon-tkm: Call esa_reset() when the inbound SA is deleted
After a rekeying the outbound SA and policy is deleted immediately, however,
the inbound SA is not removed until a few seconds later, so delayed packets
can still be processed.

This adds a flag to get_esa_id() that specifies the location of the
given SPI.
2017-08-07 10:46:00 +02:00
Tobias Brunner dbaeaaf605 charon-tkm: Remove unused get_other_esa_id() method 2017-08-07 10:46:00 +02:00
Tobias Brunner 15e745cf4d child-rekey: Don't install outbound SA in case of lost collisions
This splits the SA installation also on the initiator, so we can avoid
installing the outbound SA if we lost a rekey collision, which might
have caused traffic loss depending on the timing of the DELETEs that are
sent in both directions.
2017-08-07 10:46:00 +02:00
Tobias Brunner f0d051f192 testing: Also capture stderr during test cases
The output was not correct otherwise due to the reordering of commands.
2017-08-07 10:44:05 +02:00
Tobias Brunner 87c6247e0d testing: Clearly mark the tests that failed 2017-08-07 10:44:05 +02:00
Tobias Brunner 5163bd4b86 testing: Add tkm/xfrmproxy-rekey scenario
Similar to the xfrmproxy-expire scenario but here the TKM host is the
responder to a rekeying.
2017-08-07 10:44:05 +02:00
Tobias Brunner a721b9c53d testing: Add pfkey/net2net-rekey scenario 2017-08-07 10:44:05 +02:00
Tobias Brunner 37a91758c9 testing: Add ikev2/net2net-rekey scenario 2017-08-07 10:44:05 +02:00
Tobias Brunner 99cf64e960 testing: Add support for counting matching lines in tests
Specifying an integer instead of YES in evaltest.dat causes the number to get
compared against the actual number of lines matching the pattern.

This may be used to count matching packets or log lines.
2017-08-07 10:44:05 +02:00
Tobias Brunner f9fbcbb1a0 bus: Don't trigger child_updown() for rekeyed CHILD_SAs
We don't trigger it either when they are deleted individually.
2017-08-07 10:44:05 +02:00
Tobias Brunner d24b831fe7 charon-tkm: Don't select new outbound SA until the policy is installed
This tries to avoid packet loss during rekeying by delaying the usage of
the new outbound IKE_SA until the old one is deleted.

Note that esa_select() is a no-op in the current TKM implementation. And
the implementation also doesn't benefit from the delayed deletion of the
inbound SA as it calls esa_reset() when the outbound SA is deleted.
2017-08-07 10:44:05 +02:00
Tobias Brunner 0d42a76275 charon-tkm: Claim to support SPIs on policies
This fixes rekeying as the delayed installation of the outbound SA
caused the nonce context to be expired already.
2017-08-07 10:44:05 +02:00
Tobias Brunner a146b4c9ef child-sa: Install outbound SA immediately if kernel supports SPIs on policies 2017-08-07 10:44:05 +02:00
Tobias Brunner 2c116ef589 child-sa: Use flags to track installation of outbound SA and policies separately 2017-08-07 10:44:05 +02:00
Tobias Brunner 2699c8387a kernel-netlink: Set SPI on outbound policy
This should cause the right SA to get used if there are multiple outbound
SAs and the policies are installed properly.
2017-08-07 10:44:05 +02:00
Tobias Brunner a46d233c0e kernel-interface: Not all kernel interfaces support SPIs on policies 2017-08-07 10:44:05 +02:00
Andreas Steffen f0ae8c1761 Version bump to 5.6.0dr4 2017-08-04 21:15:45 +02:00
Andreas Steffen 808be1d57f testing: Added tnc/tnccs-20-ev-pt-tls scenario 2017-08-04 19:15:51 +02:00
Andreas Steffen 88501a64ca swid-gen: Share SWID generator between sw-collector, imc-swima and imc-swid 2017-08-04 19:15:26 +02:00
Andreas Steffen 073c179a88 sw-collector: Added --full option 2017-08-03 09:02:54 +02:00
Andreas Steffen bea3f5d07f sw-collector: Added --installed/removed options 2017-08-03 09:02:54 +02:00
Tobias Brunner 8f63a36b34 Merge branch 'appveyor'
Build and run unit tests on AppVeyor Windows containers.
2017-08-02 16:51:40 +02:00
Tobias Brunner 096626286a appveyor: Build against OpenSSL
This is mainly for the RNG needed for the exchange tests.
2017-07-28 11:23:23 +02:00