aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/tests/utils
Commit message (Collapse)AuthorAgeFilesLines
* child-sa: Use flags to track installation of outbound SA and policies separatelyTobias Brunner2017-08-071-1/+2
|
* unit-tests: Stringify direction in message asserts earlyTobias Brunner2017-07-281-6/+6
| | | | x86_64-w64-mingw32-gcc on Windows requires this.
* Change interface for enumerator_create_filter() callbackTobias Brunner2017-05-261-11/+19
| | | | | This avoids the unportable 5 pointer hack, but requires enumerating in the callback.
* unit-tests: Add assert to check for installed IPsec SAsTobias Brunner2017-05-232-3/+115
|
* unit-tests: Migrate cached IPsec SAs to new IKE_SAs during rekeyingTobias Brunner2017-05-231-0/+42
|
* unit-tests: Keep track of installed IPsec SAs in mock kernel_ipsec_t ↵Tobias Brunner2017-05-232-4/+136
| | | | implementation
* unit-tests: Overload helper macro to check for outbound SA stateTobias Brunner2017-05-231-2/+30
|
* daemon: Use separate method to set default loggersTobias Brunner2017-01-251-1/+1
| | | | | This way it is not necessary to pass the same values to reload the loggers.
* unit-tests: Only deliver messages to the SA they are addressed toTobias Brunner2016-06-171-4/+12
|
* unit-tests: Add asserts against IKE_SAsTobias Brunner2016-06-171-0/+45
|
* unit-tests: Make sure to flush the IKE_SA manager before destroying the senderTobias Brunner2016-06-171-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 Brunner2016-06-172-4/+8
|
* unit-tests: Use wrapper for add_listener in bus_t related assertsTobias Brunner2016-06-171-2/+2
|
* unit-tests: Provide a wrapper around bus_t::add_listener and unregister them ↵Tobias Brunner2016-06-172-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.
* unit-tests: Make IKE and ESP proposals configurableTobias Brunner2016-06-172-31/+103
|
* unit-tests: Add asserts against job schedulingTobias Brunner2016-06-171-0/+59
|
* unit-tests: Add asserts against task queues of IKE_SAsTobias Brunner2016-06-171-0/+32
|
* unit-tests: Add asserts against ike|child_rekey hooksTobias Brunner2016-06-172-0/+82
|
* unit-tests: Match in and outbound SPIs in SA assertsTobias Brunner2016-06-171-2/+15
| | | | Since we use unique sequential SPIs that should be OK.
* unit-tests: Register nonce generator and make first nonce byte configurableTobias Brunner2016-06-172-1/+19
|
* unit-tests: Add mock nonce generatorTobias Brunner2016-06-172-0/+128
| | | | | 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 flexibleTobias Brunner2016-06-172-26/+106
|
* unit-tests: Register mock DH implementation as static plugin featureTobias Brunner2016-06-171-0/+11
|
* unit-tests: Add mock DH implementation that's basically a noopTobias Brunner2016-06-172-0/+124
| | | | | 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 predictableTobias Brunner2016-06-171-0/+14
|
* unit-tests: Call methods on IKE_SAs in their contextTobias Brunner2016-06-172-2/+11
|
* unit-tests: Add asserts against hooks on listener_t and messages captured thereTobias Brunner2016-06-172-0/+363
|
* unit-tests: Add asserts against SAs (e.g. their states)Tobias Brunner2016-06-171-0/+55
|
* unit-tests: Add helper class/object to test IKE exchangesTobias Brunner2016-06-172-0/+330
|
* unit-tests: Add mock kernel_ipsec_t implementation for unit testsTobias Brunner2016-06-172-0/+164
| | | | Provides predictable sequential SPIs.
* unit-tests: Add mock sender_t implementation for unit testingTobias Brunner2016-06-172-0/+141
This allows to retrieve packets sent by an IKE_SA and pass it to another IKE_SA directly via process_message().