Commit Graph

16985 Commits

Author SHA1 Message Date
Andreas Steffen 08a7326181 Version bump to 5.8.0dr1 2019-03-13 19:02:42 +01:00
Tobias Brunner 023d47a08a child-create: Add missing space in DH retry log message 2019-03-13 10:30:49 +01:00
Tobias Brunner 347665420b Merge branch 'openssl-chapoly'
Adds support for ChaCha20-Poly1305 via OpenSSL.

Fixes #2946.
2019-03-08 15:56:01 +01:00
Tobias Brunner a21710d380 openssl: Add support for ChaCha20-Poly1305
It's available since OpenSSL 1.1.0.
2019-03-08 15:55:52 +01:00
Tobias Brunner 8fc6b2d0e0 openssl: Generalize the GCM implementation a bit
This will allow us to use the implementation also for other algorithms.
2019-03-08 15:55:52 +01:00
Tobias Brunner 451c2e7d58 Merge branch 'ikev1-redundant-updown'
Avoids calling updown script for redundant CHILD_SAs after IKEv1 rekey
collisions.

Fixes #2902.
2019-03-08 15:52:39 +01:00
Tobias Brunner 7f5cef5d1c ikev1: Don't trigger updown event and close action for redundant CHILD_SAs 2019-03-08 15:49:34 +01:00
Tobias Brunner bbc3d2a016 task-manager-v1: Add utility function to check if CHILD_SA is redundant 2019-03-08 15:49:34 +01:00
Tobias Brunner 090e2cf54c vici: Correctly parse inactivity timeout as uint32_t
Using parse_time() directly actually overwrites the next member in the
child_cfg_create_t struct, which is start_action, which can cause
incorrect configs if inactivity is parsed after start_action.

Fixes #2954.
2019-03-08 15:47:25 +01:00
Tobias Brunner 4ad397ef79 swanctl: Fix documentation of default value of hostaccess 2019-03-07 18:49:29 +01:00
Carl Smith 8e31d65730 child-sa: Remove temporary DROP policy using same parameters as when added
A temporary DROP policy is added to avoid traffic leak
while the SA is being updated. It is added with
manual_prio set but when the temporary policy is removed
it is removed with manual_prio parameter set to 0.
The call to del_policies_outbound does not match the original
policy and we end up with an ever increasing refcount.

If we try to manually remove the policy, it is not removed
due to the positive refcount. Then new SA requests fail with
"unable to install policy out for reqid 1618,
the same policy for reqid 1528 exists"

Fixes: 35ef1b032d ("child-sa: Install drop policies while updating IPsec SAs and policies")
Closes strongswan/strongswan#129.
2019-03-04 09:38:35 +01:00
Tobias Brunner 023cf17a90 load-tester: Update expired CA certificate
Closes strongswan/strongswan#126.
2019-02-28 17:31:43 +01:00
Tobias Brunner 8cafef2e10 travis: OpenSSL version bump 2019-02-26 16:03:28 +01:00
Tobias Brunner d091703a9e agent: Don't keep socket to ssh/gpg-agent open
Instead, create a socket when necessary.  Apparently, it can prevent
the agent from getting terminated (e.g. during system shutdown) if e.g.
charon-nm is still running with an open connection to the agent.
2019-02-20 10:43:19 +01:00
Shmulik Ladkani 71b22c250f vici: Fix wrong argument order for terminate_ike() in clear_start_action()
In 7b7290977 ("controller: Add option to force destruction of an IKE_SA")
the 'force' option was added as 3rd parameter to controller_t::terminate_ike.

However in vici's 'clear_start_action', the argument was incorrectly
placed as the 2nd parameter - constantly sending 0 (FALSE) as the
'unique_id' to terminate, rendering calls to 'handle_start_actions'
having undo=TRUE being unable to terminate the relevant conn.

For example, this is log of such a bogus 'unload-conn':

  strongswan[498]: 13[CFG] vici client 96 requests: unload-conn
  strongswan[498]: 13[CFG] closing IKE_SA #9
  strongswan[498]: 13[IKE] unable to terminate IKE_SA: ID 0 not found
  strongswan[498]: 09[CFG] vici client 96 disconnected

here, the unloaded conn's IKE id was 9, alas 'terminate_ike_execute'
reports failure to terminate "ID 0".

Fix by passing 'id, FALSE' arguments in the correct order.

Fixes: 7b7290977 ("controller: Add option to force destruction of an IKE_SA")
Signed-off-by: Shmulik Ladkani <shmulik@metanetworks.com>
Closes strongswan/strongswan#127.
2019-02-19 17:00:11 +01:00
Tobias Brunner 0f193be23d libimcv: Add Debian 9.7 to IMV database 2019-01-30 12:26:19 +01:00
Tobias Brunner c7f579fa17 kernel-netlink: Fix compilation on old kernels (< 2.6.39) 2019-01-24 10:55:24 +01:00
krinfels 7533cedb9a libtpmtss: Read RSA public key exponent instead of assuming its value
Up to now it was assumed that the RSA public key exponent is equal to 2^16+1.
Although this is probably true in most if not all cases, it is not correct
according to the TPM 2.0 specification.

This patch fixes that by reading the exponent from the structure returned
by TPM2_ReadPublic.

Closes strongswan/strongswan#121.
2019-01-21 11:52:08 +01:00
Tobias Brunner 220b0cb29c unit-tests: Verify that E and emailAddress result in the same ID 2019-01-18 11:15:16 +01:00
Tobias Brunner 6639288b1a Use Botan 2.9.0 for tests 2019-01-16 17:11:46 +01:00
Andreas Steffen eb16352232 Version bump to 5.7.2 2018-12-27 12:11:49 +01:00
Tobias Brunner e4a3ef2e4d Use https:// for URLs in documents
Also adds contribution guidelines (for Github) with links to the wiki.
2018-12-20 16:13:02 +01:00
Andreas Steffen 023b9c0edc Version bump to 5.7.2rc1 2018-12-19 13:21:48 +01:00
Tobias Brunner d1e58e11f7 NEWS: More news for 5.7.2 2018-12-18 14:48:18 +01:00
Tobias Brunner db82c0f594 Fixed some typos, courtesy of codespell 2018-12-18 11:14:19 +01:00
Tobias Brunner 0329645182 Merge branch 'radius-accounting-unclaimed'
Adds all IPs to RADIUS Accounting-Stop messages even those not claimed by
a client.  For instance, if the connection fails with FAILED_CP_REQUIRED,
adding the unclaimed addresses allows the RADIUS server to release the
leases early.

Fixes #2856.
2018-12-18 10:34:17 +01:00
Tobias Brunner 61efac6512 eap-radius: Don't clear unclaimed IPs early if accounting is enabled 2018-12-18 10:28:51 +01:00
Tobias Brunner 2de6d9d8d3 eap-radius: Add unclaimed IPs to Accounting-Stop messages
Some RADIUS servers may use these to release them early.
2018-12-18 10:28:51 +01:00
Tobias Brunner 0407d72acf eap-radius: Add method to explicitly clear unclaimed IPs
Instead of just enumerating them, removing and then destroying the entry
avoids having to keep the mutex locked.
2018-12-18 10:28:51 +01:00
Tobias Brunner 533efa91e2 eap-radius: Add RADIUS Accounting session ID to Access-Request messages
This allows e.g. associating database entries for IP leases and
accounting directly from the start.

Fixes #2853.
2018-12-17 09:46:09 +01:00
Tobias Brunner 501bd53a6c swanctl: Make credential directories relative to swanctl.conf
All directories are now considered relative to the loaded swanctl.conf
file, in particular, when loading it from a custom location via --file
argument.  The base directory, which is used if no custom location for
swanctl.conf is specified, is now also configurable at runtime via
SWANCTL_DIR environment variable.

Closes strongswan/strongswan#120.
2018-12-14 09:11:14 +01:00
Tobias Brunner 322daff844 openssl: Make sure to release the functional ENGINE reference
The functional reference created by ENGINE_init() was never released,
only the structural one created by ENGINE_by_id().  The functional
reference includes an implicit structural reference, which is also
released by ENGINE_finish().

Closes strongswan/strongswan#119.
2018-12-12 12:00:29 +01:00
Andreas Steffen 7cf3f97e56 Version bump to 5.7.2dr4 2018-12-09 19:53:31 +01:00
Andreas Steffen 77e4a420c3 libimcv: Updated openssl version in IMV database 2018-12-09 19:53:05 +01:00
Andreas Steffen 030de21b7b testing: Migrated ikev2 scenarios to swanctl 2018-12-09 13:16:41 +01:00
Tobias Brunner be1c7e3815 Merge branch 'ikev1-adopt-child-tasks'
Makes sure to adopt active and queued Quick Mode tasks if the peer
reauthenticates the IKE_SA while creating lots of CHILD_SAs.

Closes strongswan/strongswan#117.
2018-12-07 10:40:08 +01:00
Tobias Brunner 5e97a5e64b ike: Implement adopt_child_tasks() outside task managers 2018-12-07 10:32:12 +01:00
Tobias Brunner f536f6477d adopt-children-job: Adopt child-creating tasks from the old IKE_SA 2018-12-07 10:32:12 +01:00
Tobias Brunner b71604011a ike-sa: Expose task_manager_t::remove_task() 2018-12-07 10:32:12 +01:00
Tobias Brunner 4505e3c0df task-manager: Add method to remove a task from a queue 2018-12-07 10:32:12 +01:00
Tobias Brunner 44558547af ike-sa-manager: Migrate child creating tasks during IKEv1 reauth 2018-12-07 10:32:12 +01:00
Tobias Brunner 00c889f4ec ike-sa: Expose task_manager_t::adopt_child_tasks() 2018-12-07 10:32:12 +01:00
Tobias Brunner 157150ca91 charon-cmd: Register atexit() handler for libcharon_deinit twice
Similar to cbe9e575ee, this avoids issues with libraries that are
pulled in via plugins and register their own atexit() handlers.
2018-12-07 10:30:08 +01:00
Tobias Brunner 10f8834bf9 ikev2: Don't recreate IKE_SA if deletion fails after make-before-break reauth
Fixes: 7457143072 ("During reauthentication reestablish IKE_SA even if deleting the old one fails.")
Fixes #2847.
2018-12-07 10:28:21 +01:00
Tobias Brunner 01f462f0d3 ikev2: Ignore COOKIE notifies we already received
This could be due to a delayed response to an IKE_SA_INIT retransmit.

Fixes #2837.
2018-12-07 10:25:30 +01:00
Thomas Egerer eed20c21d3 ha: Add auth method for HA IKEv1 key derivation
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2018-12-07 10:17:56 +01:00
Tobias Brunner 13f92f649e Merge branch 'ha-pool-offset'
Ensure an even distribution of a pool's addresses among all segments.

Fixes #2828.
2018-12-07 10:16:21 +01:00
Tobias Brunner 5dbb826da5 ha: Divide virtual IPs evenly among all segments 2018-12-07 10:15:40 +01:00
Tobias Brunner 16a898f5f7 ha: Add getter for the number of segments 2018-12-07 10:15:05 +01:00
Tobias Brunner a8f91cd466 ha: Improve distribution of pool addresses over segments
This is particularly important for higher number of segments, but even
with small numbers there is a significant difference.  For instance,
with 4 segments the fourth segment had no IPs assigned with the old
code, no matter how large the pool, because none of the eight bits used
for the segment check hashed/mapped to it.
2018-12-07 10:12:14 +01:00