Commit Graph

14480 Commits

Author SHA1 Message Date
Tobias Brunner b9d7319fb3 vici: Add get_bool() convenience getter for VICI messages 2015-08-21 18:21:13 +02:00
Tobias Brunner ff0abde9ed controller: Optionally adhere to init limits also when initiating IKE_SAs 2015-08-21 18:21:13 +02:00
Tobias Brunner 471a996a3e ike: Also track initiating IKE_SAs as half-open 2015-08-21 18:21:13 +02:00
Tobias Brunner ffa20bad63 stroke: Allow %any as local address
Actually, resolving addresses in `left` might be overkill as we'll assume
left=local anyway (the only difference is the log message).
2015-08-21 18:19:26 +02:00
Tobias Brunner 8212f3d9a4 stroke: Add an option to disable side-swapping of configuration options
In some scenarios it might be preferred to ensure left is always local
and no unintended swaps occur.
2015-08-21 18:19:26 +02:00
Tobias Brunner a5c07be058 ikev1: Assign different job priorities for inbound IKEv1 messages 2015-08-21 18:11:44 +02:00
Tobias Brunner 8923621280 testing: Fix typo in p2pnat/behind-same-nat scenario 2015-08-21 17:48:37 +02:00
Tobias Brunner 105365eabe child-rekey: Don't add a REKEY_SA notify if the child-create task is deleting the SA 2015-08-21 16:14:07 +02:00
Tobias Brunner f91bd4b92c child-create: Cache proposed IPsec protocol
This allows us to DELETE CHILD_SAs on failures that occur before we
retrieved the selected proposal.
2015-08-21 16:14:07 +02:00
Tobias Brunner ffe0889acd child-create: Don't attempt to delete the SA if we don't have all the information
Since we only support single protocols we could probably guess it and always
send a DELETE.
2015-08-21 16:14:07 +02:00
Tobias Brunner 70c5f1d40d child-rekey: Remove redundant migrate() call for child-create sub-task
When retrying due to a DH group mismatch this is already done by the
child-create task itself.  And in other cases where the task returns
NEED_MORE we actually will need access to a possible proposal to properly
delete it.
2015-08-21 16:14:07 +02:00
Tobias Brunner 1729df9275 child-create: Fix crash when retrying CHILD_SA rekeying due to a DH group mismatch
If the responder declines our KE payload during a CHILD_SA rekeying migrate()
is called to reuse the child-create task.  But the child-rekey task then
calls the same method again.

Fixes: 32df0d81fb ("child-create: Destroy nonceg in migrate()")
2015-08-21 16:14:07 +02:00
Tobias Brunner fdb90723b7 auth-cfg: Don't enforce EAP_RADIUS
Basically the same as e79b0e07e4.  EAP_RADIUS is also a virtual method
that will identify itself as a different EAP method later.
2015-08-21 11:40:07 +02:00
Tobias Brunner efb4b9440a testing: Add missing sim_files file to ikev2/rw-eap-sim-radius scenario 2015-08-21 11:37:23 +02:00
Tobias Brunner 161d75f403 testing: alice is RADIUS server in the ikev2/rw-eap-sim-radius scenario 2015-08-21 11:17:25 +02:00
Tobias Brunner 18943c1f1b testing: Print triplets.dat files of clients in EAP-SIM scenarios
References #1078.
2015-08-21 11:16:56 +02:00
Tobias Brunner 60d4c1ccdd Merge branch 'stroke-ca-sections'
This resolves the duplicate CERTREQ issue when certificates in
ipsec.d/cacerts were referenced in ca sections.  It also ensures CA
certificates are reloaded atomically, so there is never a time when
an unchanged CA certificate is not available.

References #842.
2015-08-20 19:38:53 +02:00
Tobias Brunner 517cc501ef stroke: Change how CA certificates are stored
Since 11c14bd2f5 CA certificates referenced in ca sections were
enumerated by two credential sets if they were also stored in
ipsec.d/cacerts.  This caused duplicate certificate requests to
get sent.  All CA certificates, whether loaded automatically or
via a ca section, are now stored in stroke_ca_t.

Certificates referenced in ca sections are now also reloaded
when `ipsec rereadcacerts` is used.
2015-08-20 19:33:41 +02:00
Tobias Brunner 01d3ecbaf0 stroke: Combine CA certificate load methods
Also use the right credential set for CA cert references loaded from
stroke_ca_t.
2015-08-20 19:19:38 +02:00
Tobias Brunner 99610f406d stroke: Atomically replace CA and AA certificates when reloading them
Previously it was possible that certificates were not found between the
time the credential sets were cleared and the certificates got readded.
2015-08-20 19:19:37 +02:00
Tobias Brunner 58db4edb2c mem-cred: We don't need a write lock when looking for a certificate 2015-08-20 19:19:37 +02:00
Tobias Brunner 522b1920b6 mem-cred: Add a method to atomically replace all certificates 2015-08-20 19:19:12 +02:00
Tobias Brunner 4de361d92c ikev1: Fix handling of overlapping Quick Mode exchanges
In some cases the third message of a Quick Mode exchange might arrive
after the first message of a subsequent Quick Mode exchange.  Previously
these messages were handled incorrectly and the second Quick Mode
exchange failed.

Some implementations might even try to establish multiple Quick Modes
simultaneously, which is explicitly allowed in RFC 2409.  We don't fully
support that, though, in particular in case of retransmits.

Fixes #1076.
2015-08-20 19:13:45 +02:00
Tobias Brunner e2a252a86f kernel-pfkey: Add support for AES-GCM
The next release of FreeBSD will support this.

While Linux defines constants for AES-GCM in pfkeyv2.h since 2.6.25 it
does not actually support it.  When SAs are installed via PF_KEY only a
lookup in XFRM's list of encryption algorithms is done, but AES-GCM is in
a different table for AEAD algorithms (there is currently no lookup
function to find algorithms in that table via PF_KEY identifier).
2015-08-20 18:55:45 +02:00
Tobias Brunner e79b0e07e4 auth-cfg: Don't enforce EAP_DYNAMIC
We now store the actual method on the auth config, which won't match
anymore if rightauth=eap-dynamic is configured.
2015-08-20 18:38:16 +02:00
Tobias Brunner 5fee79d854 ikev2: Compare initiator flag again, partially reverts 17ec1c74de
We should ignore messages that have the flag set incorrectly.
This restores RFC compliance which was broken since the mentioned commit.
2015-08-20 16:58:09 +02:00
Tobias Brunner 47a340e1f7 ikev2: Drop IKE_SA_INIT messages that don't have the initiator flag set
While this doesn't really create any problems it is not 100% correct to
accept such messages because, of course, the sender of an IKE_SA_INIT
request is always the original initiator of an IKE_SA.

We currently don't check the flag later, so we wouldn't notice if the
peer doesn't set it in later messages (ike_sa_id_t.equals doesn't
compare it anymore since we added support for IKEv1, in particular since
17ec1c74de).
2015-08-20 16:05:02 +02:00
Tobias Brunner 47ee60177e ikev1: Pass current auth-cfg when looking for key to determine auth method
If multiple certificates use the same subjects we might choose the wrong
one otherwise. This way we use the one referenced with leftcert and
stored in the auth-cfg and we actually do the same thing later in the
pubkey authenticator.

Fixes #1077.
2015-08-19 17:39:01 +02:00
Tobias Brunner 49a20ef019 ikev2: Store outer EAP method used to authenticate remote peer in auth-cfg
This allows symmetric configuration of EAP methods (i.e. the same value
in leftauth and rightauth) when mutual EAP-only authentication is used.
Previously the client had to configure rightauth=eap or rightauth=any,
which prevented it from using this same config as responder.
2015-08-19 16:19:05 +02:00
Tobias Brunner 64bef354d4 imc: get_default_pwd_status(), as it currently is, works on Windows too
This fixes the build on Windows.
2015-08-19 12:10:09 +02:00
Tobias Brunner 2d14cb4d6c ike: Use the original port when remote resolves to %any
When reestablishing the IKE_SA we should still use the original port
when right resolves to %any as some implementations might not like
initial IKE messages on port 4500 (especially for IKEv1).
2015-08-19 11:34:25 +02:00
Tobias Brunner bb1d9e454d testing: Add ikev2/trap-any scenario 2015-08-19 11:34:25 +02:00
Tobias Brunner 301a0bad09 trap-manager: Enable auto=route with right=%any for transport mode connections
Fixes #196.
2015-08-19 11:31:58 +02:00
Andreas Steffen 46686372c6 Version bump to 5.3.3dr6 2015-08-19 07:18:30 +02:00
Andreas Steffen 5f60c55919 Extend HCD attribute data for tnc/tnccs-20-hcd-eap scenario 2015-08-18 21:25:39 +02:00
Andreas Steffen b19ef52d51 Added reason string support to HCD IMV 2015-08-18 21:25:39 +02:00
Andreas Steffen 627e4b9659 Fixed patches format delimited by CR/LF 2015-08-18 21:25:39 +02:00
Andreas Steffen 6a3d035505 Added imc-hcd attributes to strongswan.conf 2015-08-18 21:25:39 +02:00
Andreas Steffen ac28daac38 testing: Added tnc/tnccs-20-hcd-eap scenario 2015-08-18 21:25:39 +02:00
Andreas Steffen 18472ac21c Use PWG HCD PA-TNC subtypes to transport HCD attributes 2015-08-18 21:25:39 +02:00
Andreas Steffen 6b68719dd3 Add default password determination capability to os_info 2015-08-18 21:25:39 +02:00
Andreas Steffen 9e13c2b2cc Reintroduced ietf_attr_fwd_enabled() 2015-08-18 21:25:39 +02:00
Andreas Steffen 860df6bf75 Defined PWG HCD PA-TNC subtypes 2015-08-18 21:25:39 +02:00
Andreas Steffen 9c2e0a50a3 Added os_info support to HCD IMC 2015-08-18 21:25:38 +02:00
Andreas Steffen 9e88bb987d Subscribed Scanner IMC/IMV to IETF_FIREWALL PA subtype 2015-08-18 21:25:38 +02:00
Andreas Steffen ebed384887 testing: enable HCD IMC and IMV 2015-08-18 21:25:38 +02:00
Andreas Steffen b48ffcb1b3 Implemented HCD IMC and IMV 2015-08-18 21:25:38 +02:00
Andreas Steffen 92a9c99c38 Defined HCD PA subtype in PWG namespace 2015-08-18 21:25:38 +02:00
Andreas Steffen 21b8051c10 Completed implementation of PWG HCD attributes 2015-08-18 21:25:38 +02:00
Andreas Steffen 981653a437 Defined generic non-nul terminated string PA-TNC attribute 2015-08-18 21:25:38 +02:00