]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
2 months agokey-exchange: Add helper to concatenate shared secrets of several key exchanges
Tobias Brunner [Thu, 9 Apr 2020 09:36:30 +0000 (11:36 +0200)] 
key-exchange: Add helper to concatenate shared secrets of several key exchanges

2 months agokeymat_v2: Proper cleanup if derive_ike_keys() is called multiple times
Tobias Brunner [Thu, 28 Jun 2018 13:33:35 +0000 (15:33 +0200)] 
keymat_v2: Proper cleanup if derive_ike_keys() is called multiple times

2 months agoike-auth: Calculate and collect IntAuth for IKE_INTERMEDIATE exchanges
Tobias Brunner [Tue, 20 Aug 2019 15:07:55 +0000 (17:07 +0200)] 
ike-auth: Calculate and collect IntAuth for IKE_INTERMEDIATE exchanges

The message ID of the first IKE_AUTH exchange is a safe-guard against
potential truncation attacks if IKE_INTERMEDIATE exchanges are not used
for multiple key exchanges but some other future use where the number of
exchanges might not depend on the selected proposal.

2 months agopubkey-authenticator: Handle IntAuth data
Tobias Brunner [Tue, 20 Aug 2019 14:38:01 +0000 (16:38 +0200)] 
pubkey-authenticator: Handle IntAuth data

2 months agopsk-authenticator: Handle IntAuth data
Tobias Brunner [Tue, 20 Aug 2019 14:36:13 +0000 (16:36 +0200)] 
psk-authenticator: Handle IntAuth data

2 months agoeap-authenticator: Handle IntAuth data
Tobias Brunner [Tue, 20 Aug 2019 14:32:17 +0000 (16:32 +0200)] 
eap-authenticator: Handle IntAuth data

2 months agokeymat_v2: Include optional IntAuth in signed octets
Tobias Brunner [Tue, 20 Aug 2019 14:18:05 +0000 (16:18 +0200)] 
keymat_v2: Include optional IntAuth in signed octets

2 months agoauthenticator: Add optional method to set IntAuth data
Tobias Brunner [Tue, 20 Aug 2019 14:13:11 +0000 (16:13 +0200)] 
authenticator: Add optional method to set IntAuth data

2 months agomessage: Store original encrypted payload when generating fragments
Tobias Brunner [Mon, 19 Jul 2021 15:12:09 +0000 (17:12 +0200)] 
message: Store original encrypted payload when generating fragments

If we don't do this, get_plain() will fail after generating the message
fragmented.

2 months agomessage: Add method to generate data to authenticate IKE_INTERMEDIATE exchanges
Tobias Brunner [Tue, 20 Aug 2019 12:57:30 +0000 (14:57 +0200)] 
message: Add method to generate data to authenticate IKE_INTERMEDIATE exchanges

2 months agogenerator: Make pointer to length field optional
Tobias Brunner [Tue, 20 Aug 2019 12:53:16 +0000 (14:53 +0200)] 
generator: Make pointer to length field optional

Only useful if we generate an IKE header.

2 months agokeymat_v2: Add method to calculate IntAuth for IKE_INTERMEDIATE exchanges
Tobias Brunner [Tue, 2 Jul 2019 13:01:26 +0000 (15:01 +0200)] 
keymat_v2: Add method to calculate IntAuth for IKE_INTERMEDIATE exchanges

2 months agomessage: Add rules for IKE_FOLLOWUP_KE exchanges
Tobias Brunner [Fri, 3 Apr 2020 13:10:40 +0000 (15:10 +0200)] 
message: Add rules for IKE_FOLLOWUP_KE exchanges

2 months agoike-header: Add IKE_FOLLOWUP_KE exchange type
Tobias Brunner [Fri, 3 Apr 2020 13:01:17 +0000 (15:01 +0200)] 
ike-header: Add IKE_FOLLOWUP_KE exchange type

2 months agonotify-payload: Add notify types for multiple key exchanges
Tobias Brunner [Fri, 25 Oct 2019 12:27:47 +0000 (14:27 +0200)] 
notify-payload: Add notify types for multiple key exchanges

2 months agoikev2: Reject IKE_INTERMEDIATE requests after IKE_AUTH
Tobias Brunner [Tue, 8 Feb 2022 13:23:37 +0000 (14:23 +0100)] 
ikev2: Reject IKE_INTERMEDIATE requests after IKE_AUTH

We currently only support these exchanges for additional key exchanges,
so once we have the final keys derived and the ike-init task is removed,
we don't expect any more of them.

2 months agomessage: Add rules for IKE_INTERMEDIATE exchanges
Tobias Brunner [Fri, 25 Oct 2019 12:40:35 +0000 (14:40 +0200)] 
message: Add rules for IKE_INTERMEDIATE exchanges

2 months agoike-header: Add IKE_INTERMEDIATE exchange type
Tobias Brunner [Fri, 25 Oct 2019 12:39:54 +0000 (14:39 +0200)] 
ike-header: Add IKE_INTERMEDIATE exchange type

2 months agonotify-payload: Add notify type for IKE_INTERMEDIATE exchange
Tobias Brunner [Wed, 18 Dec 2019 17:42:59 +0000 (18:42 +0100)] 
notify-payload: Add notify type for IKE_INTERMEDIATE exchange

2 months agoproposal-substructure: Encode additional key exchange methods
Tobias Brunner [Fri, 25 Oct 2019 12:55:05 +0000 (14:55 +0200)] 
proposal-substructure: Encode additional key exchange methods

2 months agoproposal: Make all key exchange transforms optional in ESP/AH proposals
Tobias Brunner [Tue, 5 Nov 2019 09:22:36 +0000 (10:22 +0100)] 
proposal: Make all key exchange transforms optional in ESP/AH proposals

2 months agoproposal: Skip all KE transforms if PROPOSAL_SKIP_KE given
Tobias Brunner [Tue, 29 Oct 2019 10:50:00 +0000 (11:50 +0100)] 
proposal: Skip all KE transforms if PROPOSAL_SKIP_KE given

2 months agotransform: Add helper to check if transform type negotiates key exchange
Tobias Brunner [Tue, 29 Oct 2019 10:46:22 +0000 (11:46 +0100)] 
transform: Add helper to check if transform type negotiates key exchange

2 months agotransform: Add additional key exchange transform types
Tobias Brunner [Fri, 25 Oct 2019 12:20:59 +0000 (14:20 +0200)] 
transform: Add additional key exchange transform types

2 months agoUse wolfSSL 5.7.0 for tests
Tobias Brunner [Fri, 22 Mar 2024 10:43:39 +0000 (11:43 +0100)] 
Use wolfSSL 5.7.0 for tests

2 months agofarp: Fix build with musl C library
Tobias Brunner [Fri, 22 Mar 2024 09:42:34 +0000 (10:42 +0100)] 
farp: Fix build with musl C library

Same issue as described in the previous commit.

Fixes: 187c72d1afdc ("dhcp: Port the plugin to FreeBSD/macOS")
2 months agopf-handler: Fix build with musl C library
Tobias Brunner [Fri, 22 Mar 2024 08:57:07 +0000 (09:57 +0100)] 
pf-handler: Fix build with musl C library

musl's headers define a lot of networking structs.  For some, the
definition in the Linux UAPI headers is then suppressed by e.g.
__UAPI_DEF_ETHHDR.

Since we included musl's net/ethernet.h, which includes netinet/if_ether.h
that defines `struct ethhdr` (and the above constant), **after** we
include linux/if_ether.h, there was a compilation error because the
struct was defined multiple times.

However, simply moving that include doesn't fix the problem because for
ARP-specific structs the Linux headers don't provide __UAPI_DEF* checks.
So instead of directly including the linux/ headers, we include those
provided by the C library.  For glibc these usually just include the
Linux headers, but for musl this allows them to define the struct
directly.  We also need to move if.h and add packet.h, which define
other structs (or include headers that do so) that we use.

Fixes: 187c72d1afdc ("dhcp: Port the plugin to FreeBSD/macOS")
2 months agoike-sa-manager: Unlock mutex if allocating SPI fails to avoid lock contention
Thomas Egerer [Wed, 20 Mar 2024 10:11:17 +0000 (10:11 +0000)] 
ike-sa-manager: Unlock mutex if allocating SPI fails to avoid lock contention

Fixes: 5d91d8c46937 ("Check rng return value when generating SPIs in ike_sa_manager_t")
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
3 months agoVersion bump to 5.9.14 5.9.14
Andreas Steffen [Tue, 19 Mar 2024 10:56:44 +0000 (11:56 +0100)] 
Version bump to 5.9.14

3 months agogithub: Use AWS-LC 1.23.0 for tests
Tobias Brunner [Mon, 18 Mar 2024 07:01:18 +0000 (08:01 +0100)] 
github: Use AWS-LC 1.23.0 for tests

3 months agosave-keys: Fix Wireshark algorithm identifier for 3DES
Wataru Ashihara [Sat, 25 Nov 2023 10:32:20 +0000 (19:32 +0900)] 
save-keys: Fix Wireshark algorithm identifier for 3DES

Wireshark has shown the following error dialogue because the identifier
was incorrect [1]:

Error loading table 'ESP SAs': esp_sa:18: invalid value: TripleDes-CBC [RFC2451]

[1] https://github.com/wireshark/wireshark/blob/3757f42e5f0a8ee6b14a117a2fd99af759a31d98/epan/dissectors/packet-ipsec.c#L203

Closes strongswan/strongswan#2013

3 months agoike-cfg: Change how OCSP certificate requests are enabled
Tobias Brunner [Fri, 15 Mar 2024 13:40:30 +0000 (14:40 +0100)] 
ike-cfg: Change how OCSP certificate requests are enabled

The previous option caused such requests to be enabled if not explicitly
disabled, which only the vici plugin did, for all other backends requests
would have been sent.

References strongswan/strongswan#2016

3 months agopeer-cfg: Renumber ocsp_policy_t values so the same default applies for all backends
Tobias Brunner [Fri, 15 Mar 2024 13:37:53 +0000 (14:37 +0100)] 
peer-cfg: Renumber ocsp_policy_t values so the same default applies for all backends

Only the vici plugin previously set OCSP_SEND_REPLY explicitly, all other
backends would have defaulted to OCSP_SEND_BOTH.

References strongswan/strongswan#2016

3 months agokernel-pfroute: Log ignored interfaces when listing known interfaces
Tobias Brunner [Fri, 15 Mar 2024 12:47:23 +0000 (13:47 +0100)] 
kernel-pfroute: Log ignored interfaces when listing known interfaces

3 months agokernel-netlink: Log ignored interfaces when listing known interfaces
Tobias Brunner [Fri, 15 Mar 2024 12:45:08 +0000 (13:45 +0100)] 
kernel-netlink: Log ignored interfaces when listing known interfaces

3 months agoNEWS: Add news for 5.9.14
Tobias Brunner [Thu, 14 Mar 2024 16:06:08 +0000 (17:06 +0100)] 
NEWS: Add news for 5.9.14

3 months agopkcs11: Fix cleanup when verifying signature fails because scheme isn't supported
Tobias Brunner [Thu, 14 Mar 2024 12:56:21 +0000 (13:56 +0100)] 
pkcs11: Fix cleanup when verifying signature fails because scheme isn't supported

Fixes: 49769fff53f3 ("pkcs11: Support RSA-PSS signatures")
3 months agosmp: Make code that encodes identities more readable
Tobias Brunner [Thu, 14 Mar 2024 12:51:06 +0000 (13:51 +0100)] 
smp: Make code that encodes identities more readable

In particular for static code analyzers.  The previous nesting of case
statements inside of a while loop that's inside a switch statement and
a wrapping block with declaration was quite weird and Coverity didn't
like it (it figured that `type` was uninitialized even when it assumed
that get_type() returned a known type for which a case statement
existed).

3 months agoVersion bump to 5.9.14rc1 5.9.14rc1
Andreas Steffen [Wed, 13 Mar 2024 19:24:54 +0000 (20:24 +0100)] 
Version bump to 5.9.14rc1

3 months agosystime-fix: Fix declaration of validator constructor
Tobias Brunner [Wed, 13 Mar 2024 15:17:44 +0000 (16:17 +0100)] 
systime-fix: Fix declaration of validator constructor

3 months agounit-tests: Point out if ECDSA public key was rejected after private keys was not
Tobias Brunner [Wed, 13 Mar 2024 14:34:48 +0000 (15:34 +0100)] 
unit-tests: Point out if ECDSA public key was rejected after private keys was not

AWS-LC rejects public keys with explicitly encoded parameters but allows
private keys that use explicit encodings of the NIST curves.  Since the
more important aspect is that public keys are rejected, this addition to
the warning message points that out.

References strongswan/strongswan#1907

3 months agotesting: Added RFC4806 tests
Andreas Steffen [Fri, 8 Mar 2024 16:15:35 +0000 (17:15 +0100)] 
testing: Added RFC4806 tests

3 months agoAdd support for IKEv2 OCSP extensions (RFC 4806)
Jean-François Hren [Wed, 29 Nov 2023 15:51:48 +0000 (16:51 +0100)] 
Add support for IKEv2 OCSP extensions (RFC 4806)

Closes strongswan/strongswan#2016

Co-authored-by: Tobias Brunner <tobias@strongswan.org>
3 months agoMerge branch 'name-constraints'
Tobias Brunner [Wed, 13 Mar 2024 14:05:14 +0000 (15:05 +0100)] 
Merge branch 'name-constraints'

This refactors the name constraints validation in the revocation plugin
so it aligns with what's specified in RFC 5820.

It also expands the subnet/range matching for identities.

Closes strongswan/strongswan#2114

3 months agoconstraints: Properly validate name constraints according to RFC 5280
Tobias Brunner [Fri, 23 Feb 2024 16:44:44 +0000 (17:44 +0100)] 
constraints: Properly validate name constraints according to RFC 5280

The previous code was in a way too simple which resulted in it being too
strict.  For instance, it enforced that intermediate CA certificates
inherited the name constraints of their parents.  That's not required by
RFC 5280 and prevented e.g. adding constraints in an intermediate CA
certificate that's followed by another that doesn't contain any
name constraints.  That's perfectly fine as the set of constraints
specified by the parent continue to apply to that CA certificate and
the children it issues.

Name constraints were previously also applied to all identities of a
matching type, which is way too strict except for some very simple
cases.  It basically prevented multiple constraints of the same type
as e.g. an intermediate CA certificate that has permitted name constraints
for example.org and example.com couldn't issue acceptable certificates
because any SAN with one domain would get rejected by the other
constraint.  According to RFC 5280 matching one constraint is enough.

Also fixed is an issue with name constraints for IP addresses which were
previously only supported for a single level.

3 months agoidentification: Add support to match subnets/ranges against each other
Tobias Brunner [Fri, 23 Feb 2024 15:19:19 +0000 (16:19 +0100)] 
identification: Add support to match subnets/ranges against each other

Previously, it was only possible to match addresses against subnets and
ranges, but not the other way around or subnets and ranges against each
other.

3 months agoconfigure: Load constraints plugin in pki
Tobias Brunner [Fri, 23 Feb 2024 10:18:11 +0000 (11:18 +0100)] 
configure: Load constraints plugin in pki

This allows --verify to check e.g. name constraints.

3 months agogithub: Add AWS-LC CI job
Gerardo Ravago [Thu, 22 Feb 2024 18:47:58 +0000 (13:47 -0500)] 
github: Add AWS-LC CI job

AWS-LC is an OpenSSL derivative which can be used with the openssl plugin.
This adds a CI job that resembles the openssl-3 test case. It downloads
the source tarball for an AWS-LC release, builds that source using
CMake/Ninja, and then builds/tests strongSwan using the same technique
used by openssl-3.

References strongswan/strongswan#1907
Closes strongswan/strongswan#2151

3 months agostarter: Use correct type for uniqueids field
Etay Bogner [Wed, 6 Mar 2024 22:40:51 +0000 (00:40 +0200)] 
starter: Use correct type for uniqueids field

Enum arguments (ARG_ENUM with .list != LST_bool) are assumed to be of
type/size int in assign_args() in args.c.

Fixes: 0644ebd3de62 ("implemented IKE_SA uniqueness using ipsec.conf uniqueids paramater additionally supports a "keep" value to keep the old IKE_SA")
Closes strongswan/strongswan#2148

3 months agoleak-detective: Add whitelist entries for AWS-LC
Gerardo Ravago [Wed, 6 Mar 2024 15:45:00 +0000 (10:45 -0500)] 
leak-detective: Add whitelist entries for AWS-LC

AWS-LC (and likely BoringSSL) uses thread specific data to store internal
library state which gets freed via a registered destructor when the thread
terminates. If this thread happens to be the main thread, which runs the
leak-detective evaluation, the detective won't observe the corresponding free
of the related memory and erroneously reports it as a leak.

The two places this happens are:
- `RAND_bytes` for storing internal RNG state.
- `ERR_put_error` for storing the per-thread OpenSSL error queue.

References strongswan/strongswan#1907
Closes strongswan/strongswan#2147

3 months agoopenssl: Handle BoringSSL-style ASN1_INTEGERs in cert serials
Gerardo Ravago [Mon, 4 Mar 2024 15:25:12 +0000 (10:25 -0500)] 
openssl: Handle BoringSSL-style ASN1_INTEGERs in cert serials

OpenSSL stores the serial number for an X509 certificate as an
`ASN1_INTEGER` type. Within BoringSSL (and AWS-LC), the library
represents the value of zero as an empty array [1] which is different
from OpenSSL which represents it as the 1-byte array [0x00]. Though the
value of zero for the certificate serial number is illegal under
X.509 [2], we need to handle/encode it consistently within strongSwan.
From 18082ce2b061 ("certificates: Retrieve serial numbers in canonical
form"), we infer that the canonical representation of the zero serial
is [0x00]. To do this, we introduce `openssl_asn1_int2chunk` to
complement the existing string version that allows us to handle the
special case for zero instead of always returning a reference to the
library-dependent encodings.

References strongswan/strongswan#1907
Closes strongswan/strongswan#2138

[1] https://github.com/google/boringssl/commit/bdc35b63617f78037768f4897d8835696f02181a
[2] https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.2

3 months agocert-enroll: add init.d support to cert-install-sssd
Andreas Steffen [Sun, 3 Mar 2024 16:12:48 +0000 (17:12 +0100)] 
cert-enroll: add init.d support to cert-install-sssd

3 months agoutils: Define ignore_result() so it requires a semicolon
Tobias Brunner [Thu, 29 Feb 2024 15:02:28 +0000 (16:02 +0100)] 
utils: Define ignore_result() so it requires a semicolon

It previously also added its own empty statement.

3 months agoRemove obvious empty statements (i.e. stray semicolons)
Tobias Brunner [Thu, 29 Feb 2024 14:10:59 +0000 (15:10 +0100)] 
Remove obvious empty statements (i.e. stray semicolons)

3 months agogithub: Update GitHub-provided actions for Node.js update
Tobias Brunner [Wed, 28 Feb 2024 14:21:29 +0000 (15:21 +0100)] 
github: Update GitHub-provided actions for Node.js update

3 months agoutils: Define DESTROY_*_IF() macros without terminating semicolon
Tobias Brunner [Wed, 28 Feb 2024 13:40:56 +0000 (14:40 +0100)] 
utils: Define DESTROY_*_IF() macros without terminating semicolon

This avoids double semicolons (i.e. empty statements) and is how
DESTROY_IF() is already defined.

3 months agoandroid: New release after adding fix for existing shortcuts/Intents android-2.5.1
Tobias Brunner [Mon, 26 Feb 2024 10:14:14 +0000 (11:14 +0100)] 
android: New release after adding fix for existing shortcuts/Intents

3 months agoandroid: Add fallback for the old name of the profile ID extra
Tobias Brunner [Mon, 26 Feb 2024 10:01:55 +0000 (11:01 +0100)] 
android: Add fallback for the old name of the profile ID extra

This fixes existing shortcuts and automation via Intents.

Fixes: 8e3b921abed7 ("android: Always use UUID to access profiles")
3 months agoRevert "kernel-netlink: Never use XFRMA_REPLAY_ESN_VAL to configure zero replay windows"
Tobias Brunner [Fri, 23 Feb 2024 16:55:41 +0000 (17:55 +0100)] 
Revert "kernel-netlink: Never use XFRMA_REPLAY_ESN_VAL to configure zero replay windows"

This reverts commit 8b9b11919d92e9738bb52901c9dbcc72e35b9fed.

Since ESN was negotiated via proposal, just configuring the SA without
ESN won't work as the ICV will be incorrect if the peer enabled ESN
on its SA.  While the Linux kernel currently doesn't support disabling
replay protection for SAs that use ESN, this at least gets users an
explicit error not just dropped packets, and it will automatically work
if the kernel supports this combination at some point.

References strongswan/strongswan#2117

3 months agoVersion bump to 5.9.14dr1 5.9.14dr1
Andreas Steffen [Thu, 22 Feb 2024 14:51:24 +0000 (15:51 +0100)] 
Version bump to 5.9.14dr1

3 months agoUse Botan 3.3.0 for tests
Tobias Brunner [Wed, 21 Feb 2024 15:16:24 +0000 (16:16 +0100)] 
Use Botan 3.3.0 for tests

3 months agoMerge branch 'android-managed-configurations' android-2.5.0
Tobias Brunner [Thu, 22 Feb 2024 12:37:01 +0000 (13:37 +0100)] 
Merge branch 'android-managed-configurations'

This adds support for managed configurations via enterprise mobility
management (EMM) systems. Also changes details regarding the SQL data
source.

3 months agoandroid: New release after adding support for managed configurations
Tobias Brunner [Wed, 21 Feb 2024 07:29:54 +0000 (08:29 +0100)] 
android: New release after adding support for managed configurations

3 months agoandroid: Add translations for managed configuration strings
Tobias Brunner [Tue, 30 Jan 2024 17:57:43 +0000 (18:57 +0100)] 
android: Add translations for managed configuration strings

Not actually translating anything, but making the linter happy.

3 months agoandroid: Update managed certificates if config changes
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:24 +0000 (15:37 +0100)] 
android: Update managed certificates if config changes

3 months agoandroid: Add manager for managed user certificates
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:24 +0000 (15:37 +0100)] 
android: Add manager for managed user certificates

This can be used to install, replace or delete currently installed user
certificates based on the app's current managed configuration.

3 months agoandroid: Add manager for managed trusted certificates
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:24 +0000 (15:37 +0100)] 
android: Add manager for managed trusted certificates

This is used to install, replace or delete currently installed trusted
certificates based on the app's current managed configuration.

Certificates that are shared between multiple profiles are protected
and not uninstalled if a profile that uses it remains.

3 months agoandroid: Add utility class to determine differences in two lists of objects
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:24 +0000 (15:37 +0100)] 
android: Add utility class to determine differences in two lists of objects

This allows determining the difference between two lists in the form of
inserts, updates and deletes (and unchanged elements).

3 months agoandroid: Add repository for managed user certificates
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add repository for managed user certificates

3 months agoandroid: Add repository for managed trusted certificates
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add repository for managed trusted certificates

3 months agoandroid: Add base repository for installed managed certificates
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add base repository for installed managed certificates

3 months agoandroid: Add installer for managed user certificates/keys
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add installer for managed user certificates/keys

This installs the configured user certificate into Android's key store
using the DevicePolicyManager.

This is only accessible if the app is installed on an enrolled device and
has been granted the CERT_INSTALL delegate scope.

3 months agoandroid: Add installer for managed trusted certificates
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add installer for managed trusted certificates

This installs a configured CA or server certificate into the app's local
key store.

3 months agoandroid: Add database migration for managed certificates
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add database migration for managed certificates

3 months agoandroid: Add trusted and user certificates to ManagedVpnProfile
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add trusted and user certificates to ManagedVpnProfile

3 months agoandroid: Add entities for CA/server and user certificates
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add entities for CA/server and user certificates

3 months agoandroid: Add utility that parses a PKCS#12 container and extracts a KeyPair
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add utility that parses a PKCS#12 container and extracts a KeyPair

3 months agoandroid: Add utility that converts a Base64 string to a X509Certificate
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add utility that converts a Base64 string to a X509Certificate

3 months agoandroid: Add utility class that pairs a certificate with a private key
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add utility class that pairs a certificate with a private key

3 months agoandroid: Add password for client certificate to managed config
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Add password for client certificate to managed config

3 months agoandroid: Provide global database helper instance
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Provide global database helper instance

3 months agoandroid: Extend database helper with table definition
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:23 +0000 (15:37 +0100)] 
android: Extend database helper with table definition

This simplifies database migration.

3 months agoandroid: Move database helper into separate class
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:22 +0000 (15:37 +0100)] 
android: Move database helper into separate class

Reduce strong coupling between database helper and VPN profiles, to
prepare for the addition of other tables.

3 months agoandroid: Hide unmanaged profiles by default
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:22 +0000 (15:37 +0100)] 
android: Hide unmanaged profiles by default

Such profiles could exist if a user already had strongSwan installed.

3 months agoandroid: Disable access to settings depending on managed configuration
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:22 +0000 (15:37 +0100)] 
android: Disable access to settings depending on managed configuration

3 months agoandroid: Hide menu items depending on managed configuration
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:22 +0000 (15:37 +0100)] 
android: Hide menu items depending on managed configuration

Hide and disable menu items when disabled by the managed configuration.

3 months agoandroid: Add data source for managed VPN profiles
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:21 +0000 (15:37 +0100)] 
android: Add data source for managed VPN profiles

Include the managed VPN profile data source in the profile source,
to show profiles from both sources in the UI.

3 months agoandroid: Expose static instance for Application object
Tobias Brunner [Fri, 19 Jan 2024 17:29:20 +0000 (18:29 +0100)] 
android: Expose static instance for Application object

While it seems to be possible to cast Context.getApplicationContext()
to the application class, there really is no documented reason why that
should actually be the same object.

3 months agoandroid: Expose managed configuration globally and notify listeners on changes
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:22 +0000 (15:37 +0100)] 
android: Expose managed configuration globally and notify listeners on changes

Triggers a broadcast if the configuration changed and updates the
profile list accordingly (previously only handled removal of multiple
profiles).

If the app resumes, the configuration is also loaded and listeners are
notified in case the config was updated while the app was in the
background.

3 months agoandroid: Add ManagedConfigurationService and related classes
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:21 +0000 (15:37 +0100)] 
android: Add ManagedConfigurationService and related classes

Add service that provides access to managed configurations.

3 months agoandroid: Add managed_configuration.xml
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:21 +0000 (15:37 +0100)] 
android: Add managed_configuration.xml

Add managed configuration and associated English strings.

3 months agoandroid: Make VpnType#fromIdentifier null-safe
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:24 +0000 (15:37 +0100)] 
android: Make VpnType#fromIdentifier null-safe

3 months agoandroid: Add data source to VpnProfile
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:21 +0000 (15:37 +0100)] 
android: Add data source to VpnProfile

3 months agoandroid: Show warning message for read-only profiles in detail view
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:22 +0000 (15:37 +0100)] 
android: Show warning message for read-only profiles in detail view

Show a message explaining that a managed profile can't be edited in
its detail view.

3 months agoandroid: Add label to read-only profiles in list
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:22 +0000 (15:37 +0100)] 
android: Add label to read-only profiles in list

Show "Managed profile" in the list of VPN profiles, to make it
immediately obvious that a profile is managed/read-only.

3 months agoandroid: Disable copy/delete for read-only profiles
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:21 +0000 (15:37 +0100)] 
android: Disable copy/delete for read-only profiles

If a profile is marked as read-only, do not allow users to copy or
delete the profile.

3 months agoandroid: Make selected apps read-only
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:22 +0000 (15:37 +0100)] 
android: Make selected apps read-only

Also prevent users from changing selected apps in read-only VPN profiles.

3 months agoandroid: Prevent editing of read-only profiles
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:21 +0000 (15:37 +0100)] 
android: Prevent editing of read-only profiles

Do not allow users to edit read-only VPN profiles, with the exception of
the profile's password.

3 months agoandroid: Add read-only flag to VpnProfile
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:21 +0000 (15:37 +0100)] 
android: Add read-only flag to VpnProfile

3 months agoandroid: Always use UUID to access profiles
Markus Pfeiffer [Tue, 21 Nov 2023 14:37:22 +0000 (15:37 +0100)] 
android: Always use UUID to access profiles

Use the UUID rather than the ID to ensure there are no conflicts between
profiles from the database and managed profiles.