17971 Commits

Author SHA1 Message Date
Tobias Brunner
a11ce277de key-exchange: Add helper to concatenate shared secrets of several key exchanges 2021-07-06 14:45:42 +02:00
Tobias Brunner
ad62440cf6 keymat_v2: Proper cleanup if derive_ike_keys() is called multiple times 2021-07-06 14:45:42 +02:00
Tobias Brunner
3d5a96bd56 ike-sa-manager: Log SPIs when checking in an IKE_SA 2021-07-06 14:45:42 +02:00
Tobias Brunner
7d028ab2c9 ikev2: Use hashes to detect retransmits
We avoid parsing messages with unexpected message IDs.  This allows us to
process and detect retransmits of messages for which we don't have the keys
anymore (i.e. IKE_INTERMEDIATE after IKE_SA_INIT and changing the keys).

This also changes how retransmits for fragmented messages are triggered,
previously we waited for all fragments and reconstructed the message
before retransmitting the response.  Now we only track the first
fragment and if we receive a retransmit of it respond immediately
without waiting for other fragments (which are now ignored).  This is in
compliance with RFC 7383, section 2.6.1.
2021-07-06 14:45:42 +02:00
Tobias Brunner
e4e48e6f7f ike-auth: Calculate and collect IntAuth for IKE_INTERMEDIATE exchanges 2021-07-06 14:45:42 +02:00
Tobias Brunner
27c80ae017 pubkey-authenticator: Handle IntAuth data 2021-07-06 14:45:42 +02:00
Tobias Brunner
03d24398f5 psk-authenticator: Handle IntAuth data 2021-07-06 14:45:42 +02:00
Tobias Brunner
425630702e eap-authenticator: Handle IntAuth data 2021-07-06 14:45:42 +02:00
Tobias Brunner
19349aaeef keymat_v2: Include optional IntAuth in signed octets 2021-07-06 14:45:42 +02:00
Tobias Brunner
e8c7dfb391 authenticator: Add optional method to set IntAuth data 2021-07-06 14:45:42 +02:00
Tobias Brunner
8429e401a2 message: Add method to generate data to authenticate IKE_INTERMEDIATE exchanges 2021-07-06 14:45:42 +02:00
Tobias Brunner
68ef0e919b generator: Make pointer to length field optional
Only useful if we generate an IKE header.
2021-07-06 14:45:42 +02:00
Tobias Brunner
92e709397f message: Fix payload type in last unprotected payload of a fragmented message 2021-07-06 14:45:42 +02:00
Tobias Brunner
fe243606b5 keymat_v2: Add method to calculate IntAuth for IKE_INTERMEDIATE exchanges 2021-07-06 14:45:42 +02:00
Tobias Brunner
df5453b33f ike-rekey: Reset IKE_SA after processing CREATE_CHILD_SA request
This probably didn't cause any problems, as there wasn't really anything
happening between the calls, but reset it anyway, just to be safe.
2021-07-06 14:45:42 +02:00
Tobias Brunner
cc9e1c1e2f ikev2: Allow tasks to do work after processing requests/responses 2021-07-06 14:45:42 +02:00
Tobias Brunner
7015587e09 task: Add optional post_process() method
This will allows tasks to do some work after a message has been
processed.
2021-07-06 14:45:42 +02:00
Tobias Brunner
ab1d77168c ikev2: Allow tasks to do work after generating requests/responses 2021-07-06 14:45:42 +02:00
Tobias Brunner
7dd3bec141 task: Add optional post_build() method
This will allow tasks to do some work after the message has been
generated.
2021-07-06 14:45:41 +02:00
Tobias Brunner
0c375bf9a3 ike-auth: Support IKE_INTERMEDIATE exchange between IKE_SA_INIT and IKE_AUTH 2021-07-06 14:45:41 +02:00
Tobias Brunner
6b76261372 child-create: Support IKE_INTERMEDIATE exchange between IKE_SA_INIT and IKE_AUTH 2021-07-06 14:45:41 +02:00
Tobias Brunner
80af87de84 ike-mobike: Support IKE_INTERMEDIATE exchange between IKE_SA_INIT and IKE_AUTH
This changes the MID of the first IKE_AUTH message.
2021-07-06 14:45:41 +02:00
Tobias Brunner
12bb9a2c4d ike-config: Support IKE_INTERMEDIATE exchange between IKE_SA_INIT and IKE_AUTH
This changes the MID of the first IKE_AUTH message.
2021-07-06 14:45:41 +02:00
Tobias Brunner
8c9675a2fa ike-cert-post: Make absolutely sure certificates are only added to IKE_AUTH
The AUTH payload check should be fine, but add some extra checks just to make
really sure and also for clarification.
2021-07-06 14:45:41 +02:00
Tobias Brunner
c551724f3e ike-cert-pre: Support IKE_INTERMEDIATE exchange between IKE_SA_INIT and IKE_AUTH
The first IKE_AUTH does not have MID 1 if that's the case.
2021-07-06 14:45:41 +02:00
Tobias Brunner
611983987c status: Add return_need_more() utility function 2021-07-06 14:45:41 +02:00
Tobias Brunner
f9f8b175fd message: Add rules for IKE_FOLLOWUP_KE exchanges 2021-07-06 14:45:41 +02:00
Tobias Brunner
fd1e928e1f wip: ike-header: Add IKE_FOLLOWUP_KE exchange type 2021-07-06 14:45:41 +02:00
Tobias Brunner
8da5a95cfc message: Add rules for IKE_INTERMEDIATE exchanges 2021-07-06 14:45:41 +02:00
Tobias Brunner
19c9bb44c9 wip: ike-header: Add IKE_INTERMEDIATE exchange type 2021-07-06 14:45:41 +02:00
Tobias Brunner
497c40b70b wip: notify-payload: Add notify types for multiple key exchanges 2021-07-06 14:45:41 +02:00
Tobias Brunner
6110ad0181 wip: notify-payload: Add notify type for IKE_INTERMEDIATE exchange 2021-07-06 14:45:41 +02:00
Tobias Brunner
45d0ae5d4f proposal-substructure: Encode additional key exchange methods 2021-07-06 14:45:41 +02:00
Tobias Brunner
7db736c761 child-cfg: Add method to check if an algorithm is proposed 2021-07-06 14:45:41 +02:00
Tobias Brunner
d739316681 child-cfg: Generalize get_ke_method() method 2021-07-06 14:45:41 +02:00
Tobias Brunner
e47193a7c0 ike-cfg: Generalize get_ke_method() method 2021-07-06 14:45:41 +02:00
Tobias Brunner
80ad22563a proposal: Generalize KE methods 2021-07-06 14:45:41 +02:00
Tobias Brunner
ea1fb56281 proposal: Make all key exchange transforms optional in ESP/AH proposals 2021-07-06 14:45:41 +02:00
Tobias Brunner
f03e8863ac proposal: Skip all KE transforms if PROPOSAL_SKIP_KE given 2021-07-06 14:45:41 +02:00
Tobias Brunner
4c6fc2b62c transform: Add helper to check if transform type negotiates key exchange 2021-07-06 14:45:41 +02:00
Tobias Brunner
a8e55363fa transform: Add additional key exchange transform types 2021-07-06 14:45:41 +02:00
Tobias Brunner
4d773a1e48 Rename diffie_hellman_t to key_exchange_t and change the interface etc.
This makes it more generic so we can use it for QSKE methods.
2021-07-06 14:45:41 +02:00
Andreas Steffen
4817d5ed0d Version bump to 5.9.3 5.9.3 2021-07-06 14:00:39 +02:00
Andreas Steffen
a09a905e1d vici: Suppress trailing nul character 2021-07-06 12:06:23 +02:00
Tobias Brunner
2cd5314de7 testing: Use specific versions of swidGenerator and strongTNC
This way we get updated versions automatically (referencing "master"
required manually deleting the downloaded archives and the unpacked
directories).  It also allows switching versions when working in different
branches (note that REV can also be set to a commit ID, e.g. to test
changes before tagging them later and merging the branch).
2021-06-30 16:17:39 +02:00
Tobias Brunner
06e11b481b kernel-netlink: Fix theoretical memory leak when parsing routes
This currently can't happen as the kernel always puts RTA_TABLE as first
attribute in RTM_NEWROUTE messages.
2021-06-25 13:51:44 +02:00
Tobias Brunner
f6aafb3005 Fixed some typos, courtesy of codespell
Main change is the conversion from the British cancelling/-ed to the
American canceling/-ed.
2021-06-25 11:32:29 +02:00
Andreas Steffen
30fab57124 Version bump to 5.9.3rc1 5.9.3rc1 2021-06-24 09:18:54 +02:00
Tobias Brunner
19611b1d28 testing: Build wolfSSL from the Git repository
Use the same configure options etc. for both builds (no need for the cert
options as we don't use TLS or X.509 parsing) and switch to a Git commit
that includes the SHA-3 OID fix (it's actually the fix itself).
2021-06-22 17:54:15 +02:00
Andreas Steffen
4baca5ca80 testing: Fixed ikev2/farp scenario 2021-06-22 12:32:35 +02:00