Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | ike-rekey: Handle TEMPORARY_FAILURE notify | Tobias Brunner | 2016-06-17 | 1 | -8/+22 | |
| | | ||||||
| * | ike-rekey: Respond with TEMPORARY_FAILURE if we are deleting the SA | Tobias Brunner | 2016-06-17 | 1 | -0/+5 | |
| | | ||||||
| * | unit-tests: Add tests for IKE SA deletion | Tobias Brunner | 2016-06-17 | 3 | -0/+139 | |
| | | ||||||
| * | ike-delete: No need to wait for a response in case of concurrent deletes | Tobias Brunner | 2016-06-17 | 1 | -14/+0 | |
| | | | | | | | | | | RFC 7296 explicitly says we SHOULD reply as usual and forget about our own close request. | |||||
| * | unit-tests: Only deliver messages to the SA they are addressed to | Tobias Brunner | 2016-06-17 | 1 | -4/+12 | |
| | | ||||||
| * | unit-tests: Add test for simple IKE rekey collision | Tobias Brunner | 2016-06-17 | 1 | -5/+171 | |
| | | ||||||
| * | ikev2: Add a new state to track rekeyed IKE_SAs | Tobias Brunner | 2016-06-17 | 7 | -44/+53 | |
| | | | | | | | | | | | | | | | | | | This makes handling such IKE_SAs more specifically compared to keeping them in state IKE_CONNECTING or IKE_ESTABLISHED (which we did when we lost a collision - even triggering the ike_updown event), or using IKE_REKEYING for them, which would also be ambiguous. For instance, we can now reject anything but DELETES for such SAs. | |||||
| * | ike-rekey: Add the name/ID of the redundant IKE_SAs to the log messages | Tobias Brunner | 2016-06-17 | 1 | -8/+13 | |
| | | ||||||
| * | unit-tests: Add tests for IKE_SA rekeying | Tobias Brunner | 2016-06-17 | 3 | -0/+111 | |
| | | ||||||
| * | unit-tests: Add asserts against IKE_SAs | Tobias Brunner | 2016-06-17 | 1 | -0/+45 | |
| | | ||||||
| * | unit-tests: Make sure to flush the IKE_SA manager before destroying the sender | Tobias Brunner | 2016-06-17 | 1 | -1/+3 | |
| | | | | | | | | | | | | | | | | | | | | As the static plugin that creates and destroys the default sender was not initialized because of the missing socket the daemon won't destroy our sender. Test cases will eventually have to flush the IKE_SA manager to satisfy the leak detective. However, in case of a test failure and if there are IKE_SAs in the manager the daemon will flush the SAs when deinitializing, which will cause deletes to get sent. This crashes if the sender is already destroyed. | |||||
| * | unit-tests: Return status from process_message() | Tobias Brunner | 2016-06-17 | 2 | -4/+8 | |
| | | ||||||
| * | unit-tests: Use wrapper for add_listener in bus_t related asserts | Tobias Brunner | 2016-06-17 | 1 | -2/+2 | |
| | | ||||||
| * | unit-tests: Provide a wrapper around bus_t::add_listener and unregister them ↵ | Tobias Brunner | 2016-06-17 | 2 | -0/+32 | |
| | | | | | | | | | | | | | | | | during cleanup In case listeners on the stack are triggered while cleaning up after a test failed (e.g. via ike_sa_manager_t::flush) remaining listeners defined on the stack would cause a segmentation fault. | |||||
| * | ike-sa-manager: Make sure rng is defined before destroying it in flush() | Tobias Brunner | 2016-06-17 | 1 | -1/+1 | |
| | | | | | | | | This allows calling flush() multiple times. | |||||
| * | ike-rekey: Establish new IKE_SA earlier as responder, but only if no collision | Tobias Brunner | 2016-06-17 | 1 | -3/+8 | |
| | | | | | | | | | | | | Moving to the new SA only after receiving the DELETE for the old SA was not ideal as it rendered the new SA unusable (because it simply didn't exist in the manager) if the DELETE was delayed/got dropped. | |||||
| * | unit-tests: Add tests where a peer is not aware of a CHILD_SA rekey collision | Tobias Brunner | 2016-06-17 | 1 | -1/+354 | |
| | | ||||||
| * | child-delete: Check if the deleted CHILD_SA is the redundant SA of a collision | Tobias Brunner | 2016-06-17 | 1 | -4/+39 | |
| | | | | | | | | | | | | This happens if the peer deletes the redundant SA before we are able to handle the response. The deleted SA will be in state CHILD_INSTALLED but we don't want to trigger the child_updown() event for it or recreate it. | |||||
| * | child-rekey: Add method to check for the redundant SA created in a collision | Tobias Brunner | 2016-06-17 | 2 | -18/+37 | |
| | | ||||||
| * | unit-tests: Test for rekeying if INVALID_KE_PAYLOAD notifies are received | Tobias Brunner | 2016-06-17 | 1 | -0/+253 | |
| | | ||||||
| * | child-rekey: Don't change state to INSTALLED if it was already REKEYING | Tobias Brunner | 2016-06-17 | 1 | -3/+5 | |
| | | | | | | | | | | This happens if there is a rekey collision and the peers disagree on the DH group. | |||||
| * | unit-tests: Make IKE and ESP proposals configurable | Tobias Brunner | 2016-06-17 | 4 | -44/+116 | |
| | | ||||||
| * | unit-tests: Add tests for CHILD_SA rekeying/deletion collisions | Tobias Brunner | 2016-06-17 | 1 | -1/+288 | |
| | | ||||||
| * | unit-tests: Add asserts against job scheduling | Tobias Brunner | 2016-06-17 | 2 | -0/+60 | |
| | | ||||||
| * | ikev2: Use CHILD_REKEYED for replaced CHILD_SAs after rekeying | Tobias Brunner | 2016-06-17 | 3 | -15/+17 | |
| | | | | | | | | This allows handling collisions better, in particular with deletions. | |||||
| * | unit-tests: Add asserts against task queues of IKE_SAs | Tobias Brunner | 2016-06-17 | 1 | -0/+32 | |
| | | ||||||
| * | child-rekey: Use more appropriate error notifies if CHILD_SA is not found or ↵ | Tobias Brunner | 2016-06-17 | 1 | -3/+8 | |
| | | | | | | | | | | | | getting deleted These are the notifies we should return according to RFC 7296. | |||||
| * | child-rekey: Recreate the CHILD_SA if we receive a CHILD_SA_NOT_FOUND notify | Tobias Brunner | 2016-06-17 | 1 | -0/+28 | |
| | | ||||||
| * | child-create: Handle TEMPORARY_FAILURE notify as failure | Tobias Brunner | 2016-06-17 | 2 | -4/+5 | |
| | | | | | | | | | | We will later add code to retry creating the CHILD_SA if we are not rekeying. Rekeying is already rescheduled as with any other errors. | |||||
| * | unit-tests: Add unit tests for basic CHILD_SA rekeying | Tobias Brunner | 2016-06-17 | 3 | -0/+237 | |
| | | ||||||
| * | unit-tests: Add asserts against ike|child_rekey hooks | Tobias Brunner | 2016-06-17 | 2 | -0/+82 | |
| | | ||||||
| * | unit-tests: Match in and outbound SPIs in SA asserts | Tobias Brunner | 2016-06-17 | 1 | -2/+15 | |
| | | | | | | | | Since we use unique sequential SPIs that should be OK. | |||||
| * | unit-tests: Register nonce generator and make first nonce byte configurable | Tobias Brunner | 2016-06-17 | 2 | -1/+19 | |
| | | ||||||
| * | crypto-factory: Stop after successfully creating one nonce generator | Tobias Brunner | 2016-06-17 | 1 | -0/+4 | |
| | | | | | | | | Fixes: e2fc09c186c3 ("Add nonce generator interface") | |||||
| * | unit-tests: Add mock nonce generator | Tobias Brunner | 2016-06-17 | 3 | -0/+129 | |
| | | | | | | | | | | We don't make the full nonces configurable but only the first byte, which should be enough to force a nonce to be smaller than others. | |||||
| * | unit-tests: Make message asserts more flexible | Tobias Brunner | 2016-06-17 | 2 | -26/+106 | |
| | | ||||||
| * | unit-tests: Add another CHILD_SA delete collision | Tobias Brunner | 2016-06-17 | 1 | -1/+56 | |
| | | ||||||
| * | unit-tests: Register mock DH implementation as static plugin feature | Tobias Brunner | 2016-06-17 | 1 | -0/+11 | |
| | | ||||||
| * | unit-tests: Add mock DH implementation that's basically a noop | Tobias Brunner | 2016-06-17 | 3 | -0/+125 | |
| | | | | | | | | | | If the openssl plugin is built DH isn't that much of an overhead as ecp256 is used, but the default MODP group is now modp3072. | |||||
| * | unit-tests: Make IKE SPIs predictable | Tobias Brunner | 2016-06-17 | 1 | -0/+14 | |
| | | ||||||
| * | unit-tests: Call methods on IKE_SAs in their context | Tobias Brunner | 2016-06-17 | 3 | -9/+18 | |
| | | ||||||
| * | unit-tests: Add a unit test for CHILD_SA DELETE collisions | Tobias Brunner | 2016-06-17 | 3 | -0/+149 | |
| | | ||||||
| * | child-delete: Remove unnecessary call to destroy_child_sa() | Tobias Brunner | 2016-06-17 | 1 | -2/+0 | |
| | | | | | | | | | | | | | | | | | | | | | | | | Generally, we will not find the CHILD_SA by searching for it with the outbound SPI (the initiator of the DELETE sent its inbound SPI) - and if we found a CHILD_SA it would most likely be the wrong one (one in which we used the same inbound SPI as the peer used for the one it deletes). And we don't actually want to destroy the CHILD_SA at this point as we know we already initiated a DELETE ourselves, which means that task still has a reference to it and will destroy the CHILD_SA when it receives the response from the other peer. | |||||
| * | unit-tests: Add asserts against hooks on listener_t and messages captured there | Tobias Brunner | 2016-06-17 | 3 | -0/+364 | |
| | | ||||||
| * | unit-tests: Add asserts against SAs (e.g. their states) | Tobias Brunner | 2016-06-17 | 2 | -0/+56 | |
| | | ||||||
| * | unit-tests: Add separate test runner to test IKEv2 exchanges | Tobias Brunner | 2016-06-17 | 3 | -4/+100 | |
| | | | | | | | | This allows proper initialization of the daemon and the helper object. | |||||
| * | unit-tests: Add helper class/object to test IKE exchanges | Tobias Brunner | 2016-06-17 | 3 | -0/+331 | |
| | | ||||||
| * | unit-tests: Add mock kernel_ipsec_t implementation for unit tests | Tobias Brunner | 2016-06-17 | 3 | -0/+165 | |
| | | | | | | | | Provides predictable sequential SPIs. | |||||
| * | unit-tests: Add mock sender_t implementation for unit testing | Tobias Brunner | 2016-06-17 | 4 | -0/+153 | |
| | | | | | | | | | | This allows to retrieve packets sent by an IKE_SA and pass it to another IKE_SA directly via process_message(). | |||||
| * | unit-tests: Defining TESTS_RUNNERS allows to only run specific test runners | Tobias Brunner | 2016-06-17 | 2 | -1/+33 | |
| | |