17976 Commits

Author SHA1 Message Date
Tobias Brunner
6467f0416f testing: Fix updown script in route-based/net2net-xfrmi-ike scenario
With the update to Python 3 the encoding of the values in vici messages
changed to bytestrings (the keys are properly decoded).  And getting the
first CHILD_SA also needs a change.

The logger is now also initialized after daemonizing to avoid that opened
sockets are closed etc.
2021-09-21 12:50:12 +02:00
Andreas Steffen
3e2841572b testing: Switch to Python 3
Both swidGenerator and strongTNC were migrated to Python 3.
This allows to migrate all testing scripts to Python 3, too.
2021-09-21 09:47:43 +02:00
Tobias Brunner
a5662e8f6e keymat_v2: Properly wipe DH secret during IKE_SA rekeying
While `secret` is wiped explicitly, it wasn't when concatenating with
the nonces.
2021-09-20 16:10:03 +02:00
Andreas Steffen
91896264b2 sec-updater: Use latest versions 2021-09-09 22:54:38 +02:00
Andreas Steffen
d23ca7f345 os_info: Parse /etc/os-release first 2021-09-09 22:54:38 +02:00
Tobias Brunner
bf91b71f1a github: Remove build on Ubuntu Xenial (16.04)
Support for it will be removed later this month.
2021-09-09 12:30:17 +02:00
Tobias Brunner
a415761a8e vici: Update supported Python versions 2021-09-09 12:30:17 +02:00
Noel Kuntze
fbd4930323 vici: Add DBG4 messages that print loaded shared keys and PINs
Closes strongswan/strongswan#217
2021-09-02 10:42:41 +02:00
Tobias Brunner
3c0d7ec531 ike: Initiate new IKE_SA not until all children are queued
If there are many CHILD_SAs, the time between initiating the new IKE_SA
and checking it in might be longer (depending on what else is going on
in the daemon) than the retransmission timeout and no retransmits might
be sent afterwards for this SA (it will just linger around dead).
Calling initiate() last should avoid that (we do this similarly for MBB
reauthentication).
2021-08-24 14:31:55 +02:00
Tobias Brunner
23e46ea5ab ikev2: Only request reauth during IKE_AUTH if active reauth is not possible
If we can initiate the reauthentication ourselves, there is no reason to
explicitly request the peer to do so (at basically the same time).
2021-08-24 14:31:55 +02:00
Tobias Brunner
0d373e25e0 ike-rekey: Respond with TEMPORARY_FAILURE while reauthenticating
This could lead to duplicates as the new IKE_SA can't delete the old one
once reauthentication is complete if it was replaced by a rekeying.
2021-08-24 14:31:55 +02:00
Tobias Brunner
36161febd3 ike: Don't rekey IKE_SA while reauthenticating
If we are using make-before-break reauthentication, this could lead to
duplicates as the new IKE_SA wouldn't be able to delete the previous
one if it was replaced by a rekeying.
2021-08-24 14:31:55 +02:00
Tobias Brunner
48fbe1d2d5 ike-delete: Don't call reestablish() when reauthenticating
If we initiated a make-before-break reauthentication and the peer
concurrently deletes the IKE_SA (e.g. because it uses break-before-make
reauthentication), we would create a duplicate IKE_SA (the condition forces
a recreation of all existing CHILD_SAs because reestablish() is also called
to complete a break-before-make reauthentication).
2021-08-24 14:31:55 +02:00
Tobias Brunner
57e68ab9c5 openssl: Improve compatibility to newer BoringSSL releases
Closes strongswan/strongswan#352
2021-08-24 14:20:37 +02:00
Tobias Brunner
1d64b6c462 Merge branch 'swanctl-ssh-public-keys'
Minor changes that allow loading SSH public keys via `pubkeys` in
swanctl.conf.

References strongswan/strongswan#467
2021-08-23 18:04:50 +02:00
Tobias Brunner
5821f2cc01 pubkey: Ignore X.509 flags passed to the parser 2021-08-23 17:59:39 +02:00
Tobias Brunner
4dfa31c8a0 pubkey: Don't assume blobs are only ASN.1 DER
Also forward the blob's type when parsing pubkeys.
2021-08-23 17:59:39 +02:00
Tobias Brunner
de5609b297 vici: Use the more generic BUILD_BLOB to parse certificates/public keys 2021-08-23 17:59:39 +02:00
Tobias Brunner
b4a34ff5ea github: Remove github.ref from cache keys
According to the documentation for actions/cache, the lookup is already
scoped to the current branch (with fallback to any base branch including
the default branch).
2021-08-23 17:53:33 +02:00
Tobias Brunner
8d422d2c83 tpm_extendpcr: Support platforms not having syslog() 2021-08-23 11:30:15 +02:00
Tobias Brunner
4aa6da69aa tpm_extendpcr: Build does not depend on tpm plugin but libtpmtss
The utility basically requires a TSS, the tpm plugin is not used at all.
2021-08-23 10:44:41 +02:00
Andreas Steffen
0eb1d6c0e6 Version bump to 5.9.4dr1 5.9.4dr1 2021-08-22 10:55:37 +02:00
Tobias Brunner
5126e7c0fc libtpmtss: Initialize library from all users
Previously, only the tpm plugin initialized the library, so in order
to use a TPM 2.0 (a required TCTI library is loaded via init), it was
necessary to load it even if none of its actual features were used.
2021-08-20 17:10:11 +02:00
Tobias Brunner
6c1210dcf6 configure: Enforce tss-tss2 if tpm plugin is enabled
The plugin is useless without a TSS 2.0 and this is currently the only one.
2021-08-20 10:45:44 +02:00
Tobias Brunner
64b281723c openssl: Use a longer key to test/initialize HMAC instances
OpenSSL enforces a minimum of 14 bytes (112 bits) on the key size when
used in FIPS-mode (as required by SP 800-131A).  So by using an empty
string, instantiation always failed.  32 bytes (256 bits) should be safe
for now.

Closes strongswan/strongswan#557
2021-08-19 14:06:19 +02:00
Tobias Brunner
e6a904de69 testing: Fix build of tkm and tkm-rpc 2021-08-17 19:20:45 +02:00
Tobias Brunner
ce607d774b github: Use latest version of SonarScanner 2021-08-16 11:26:11 +02:00
Tobias Brunner
1c4e134f26 kernel-netlink: Initialize ifreq structs when detecting offload capability 2021-08-11 15:35:52 +02:00
Noel Kuntze
5d6e69a6e4 gitignore: Add nbproject/
As used by the NetBeans IDE.

Closes strongswan/strongswan#505.
2021-07-26 10:43:40 +02:00
Tobias Brunner
4ae9b482f2 Ignore android-* tags when using git describe android-2.3.3-1 2021-07-14 10:31:52 +02:00
Tobias Brunner
1aa68a78f8 Merge branch 'android-updates'
Adds a button to install user certificates and updates the target SDK
version for Android 11 (and the related deprecation fixes), which will
be mandatory later this year.

The release also includes an older commit that changed how DNS servers
are applied to TUN devices (cd10ae2ff050 ("android: Explicitly apply DNS
servers to the TUN device")).

Also added are metadata for F-Droid.
android-2.3.3
2021-07-14 10:05:08 +02:00
Tobias Brunner
358d3d0ba1 android: New release after adding button to install PKCS#12 and SDK update
It also includes an unreleased change that affects when/how DNS servers
are applied to the TUN device.
2021-07-14 09:59:02 +02:00
Tobias Brunner
a14337bcde android: Request QUERY_ALL_PACKAGES permission
This is required when targeting Android 11 (API 30) in order to see all
packages, which we use to allow selecting apps ex-/included from VPN
profiles and for the EAP-TNC use case.
2021-07-14 09:59:02 +02:00
Tobias Brunner
3eadd0fc3a android: Add Triple-T metadata for F-Droid
We currently don't use Triple-T but the metadata is also parsed by F-Droid
to provide information for included apps.
2021-07-14 09:59:02 +02:00
Tobias Brunner
2f1bf11dca android: Add a button to install user certificates
Newer Android versions don't provide this option anymore on the
selection dialog.
2021-07-14 09:59:02 +02:00
Tobias Brunner
b3cdbe6693 android: Replace deprecated Switch with SwitchCompat 2021-07-14 09:59:02 +02:00
Tobias Brunner
26354d0aba android: Replace deprecated AsyncTask instances
As suggested by the Android docs, we use a global thread pool and handler
to avoid recreating them repeatedly.  Four threads should be more than
enough as we only use this to load CA certificates when the app starts
initially and to load user certs when editing a profile.
2021-07-14 09:59:02 +02:00
Tobias Brunner
a8cc146240 android: Migrate from deprecated ViewPager to ViewPager2 for CA cert lists 2021-07-13 14:26:38 +02:00
Tobias Brunner
c976165533 android: Replace deprecated FileObserver() constructor with newer SDKs 2021-07-13 14:25:46 +02:00
Tobias Brunner
dc351a30e1 android: Replace usage of deprecated Handler() constructor 2021-07-13 14:25:46 +02:00
Tobias Brunner
93c494e295 android: Replace deprecated onActivityCreated() with onViewCreated() 2021-07-13 14:25:46 +02:00
Tobias Brunner
7cd50aeb64 android: Replace deprecated startActivityForResult/onActivityResult usage 2021-07-13 14:25:44 +02:00
Tobias Brunner
a885e38265 android: Set compile-/targetSdkVersion to 30
This will be mandatory for new apps in August and for existing apps
in November.  However, several classes like AsyncTask are now deprecated
so this needs some work to avoid warnings and problems in the future.
2021-07-13 14:18:42 +02:00
Tobias Brunner
6f3725ea8b android: Replace jcenter with mavenCentral repository 2021-07-13 14:18:42 +02:00
Tobias Brunner
5831009941 android: Update dependencies 2021-07-13 14:18:42 +02:00
Tobias Brunner
44e16a63ef android: Update Gradle plugin 2021-07-13 14:18:42 +02:00
Tobias Brunner
2f9114bce1 Use wolfSSL 4.8.0 for tests 2021-07-13 10:19:56 +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