Commit Graph

17314 Commits

Author SHA1 Message Date
Tobias Brunner 768e013790 prf-plus: Fail after counter has wrapped around
The behavior is undefined if this happens (RFC 7296, section 2.13).
Instead of switching to the non-counter mode, or letting the counter
wrap, this makes it clear that the usage was not as intended.
2019-10-21 13:53:11 +02:00
Tobias Brunner c75010080a prf-plus: Fix a potential memory leak if get_bytes() fails 2019-10-21 12:22:22 +02:00
Tobias Brunner 1b96e4a465 drbg-ctr: Remove unused variable 2019-10-21 10:32:59 +02:00
David Garske 29f7017663 wolfssl: Fix for issue with blinding not defined
Closes strongswan/strongswan#156.
2019-10-21 09:56:55 +02:00
Andreas Steffen 4f4e026d3b Version bump to 5.8.2dr1 2019-10-18 16:26:41 +02:00
Andreas Steffen f05e9eebb0 testing: Added drbg plugin where required 2019-10-18 16:24:39 +02:00
Andreas Steffen e36af6fc2f gmp: Use NIST DRBG for RSA key pair generation 2019-10-18 16:24:39 +02:00
Andreas Steffen ea41f759b3 stroke: List drbgs in list_algs 2019-10-18 16:24:39 +02:00
Andreas Steffen c738704ab6 vici: List drbgs in get_algorithms 2019-10-16 16:46:24 +02:00
Andreas Steffen 6d3a743d90 ntru: Replaced ntru_drbg by drbg 2019-10-16 16:46:24 +02:00
Andreas Steffen 737375a2d2 drbg: Implemented NIST SP-800-90A DRBG 2019-10-16 16:46:24 +02:00
Tobias Brunner 2a7937f179 Merge branch 'android-updates'
Makes the local identity configurable and includes a fix for Android 10,
plus a break-before-make reauth issue (not Android specific) and some
deprecation workarounds.
2019-10-15 17:28:25 +02:00
Tobias Brunner 6e12aa68b3 android: New release after making local identity configurable
This also includes a fix for Android 10 and some older fixes for
API level 28 compatibility and a crash on Huawei devices.  The API
used to detect network changes is also replaced on newer Android
versions and an issue with DELETES received during break-before-make
reauthentication is also fixed.
2019-10-15 17:25:42 +02:00
Tobias Brunner 60457e2aef ike-delete: Continue break-before-make reauth if server concurrently deletes SA
There seem to be servers around that, upon receiving a delete from the
client, instead of responding with an empty INFORMATIONAL, send a delete
themselves.
2019-10-15 17:25:37 +02:00
Tobias Brunner 71d143149c android: Replace deprecated CONNECTIVITY_ACTION on newer Android versions
It was deprecated in API level 28, registerNetworkCallback is available
since API level 21, but ConnectivityManager got some updates with 24
(e.g. default network handling) so we start using it then.
2019-10-15 17:07:02 +02:00
Tobias Brunner 1227b43fe4 android: Don't use specific key types to select user certificates
Android 10 will honor the preselection and could, thus, hide some
installed certificates if we only pass "RSA".  The dialog will also only
be shown if there are actually certificates installed (i.e. users will
have to do that manually outside of the app or via profile import).

Fixes #3196.
2019-10-15 17:06:36 +02:00
Tobias Brunner a82673346e android: Import local identity for all authentication types 2019-10-15 17:05:56 +02:00
Tobias Brunner 698a18e7a5 android: Allow configuration of client identity for all authentication types
This replaces the drop-down box to select certificate identities with a
text field (in the advanced settings) with auto-completion for SANs
contained in the certificate.

The field is always shown and allows using an IKE identity different from
the username for EAP authentication (e.g. to configure a more complete
identity to select a specific config on the server).

Fixes #3134.
2019-10-15 17:05:56 +02:00
Tobias Brunner df0214baa6 android: Rename adapter for gateway address auto-completion 2019-10-15 12:18:45 +02:00
Tobias Brunner 999287f679 android: No auto-completion required for DNS server text box 2019-10-15 12:18:45 +02:00
Tobias Brunner 2e74fc2197 android: Add helper to read strings from text boxes 2019-10-15 12:18:45 +02:00
Tobias Brunner 54a4a3632d android: Fix deprecation warning related to FragmentPagerAdapter 2019-10-15 12:18:45 +02:00
Tobias Brunner 2ee1c6b106 android: Update AndroidX libraries 2019-10-15 12:18:45 +02:00
Tobias Brunner 57d61730b0 android: Update Gradle plugin 2019-10-15 12:18:45 +02:00
Patryk Duda 121390fb3c kernel-pfkey: Pass ESN flag to kernel if ESN is enabled
This patch adds passing the ESN flag to the kernel if ESN was negotiated
and the appropriate flag is present in the kernel headers, which will
be the case in future FreeBSD releases.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
Closes strongswan/strongswan#155.
2019-10-14 18:03:34 +02:00
Tobias Brunner 9cc24ca39e Use Botan 2.12.1 for tests 2019-10-14 11:43:58 +02:00
Tobias Brunner 0736882678 Use Botan 2.12.0 for tests 2019-10-07 14:31:40 +02:00
Felix Kaiser 7c74ce9190 vici: Use unique names for CHILD_SAs in the child-updown event too
The unique names were introduced for the list-sas command in commit
04c0219e55.  However, the child-updown
event wasn't updated to match.  Even though the documentation suggests
that the section name of the CHILD_SAs are the same in both messages.

The original name is already being returned in the "name" attribute,
so it'll still be available.

Example:

    >>> import vici, json
    >>> s = vici.Session()

    # First, for comparison, the list-sas command:
    >>> print(json.dumps(list(s.list_sas()), sort_keys=True, indent=4, separators=(',', ': ')))
    [
        {
            "vti0": {
                "child-sas": {
                    "vti0-1": {
                        ...

    # A child-updown event before the change:
    >>> for x in s.listen(["child-updown"]): print(json.dumps(x, sort_keys=True, indent=4, separators=(',', ': ')))
    [
        "child-updown",
        {
            "vti0": {
                "child-sas": {
                    "vti0": {   # <-- wrong: inconsistent with list-sas
                        ...

    # A child-updown event after the change:
    >>> s = vici.Session()
    >>> for x in s.listen(["child-updown"]): print(json.dumps(x, sort_keys=True, indent=4, separators=(',', ': ')))
    [
        "child-updown",
        {
            "vti0": {
                "child-sas": {
                    "vti0-1": {  # <-- fixed

Closes strongswan/strongswan#153.
2019-10-04 10:11:18 +02:00
Tobias Brunner d3bd576c46 fuzz: Add fuzzer for identification_t 2019-09-30 10:10:43 +02:00
Tobias Brunner 936d101d99 travis: Bump tpm2-tss to 2.3.1 2019-09-26 11:57:52 +02:00
David Garske 1a256ca65a wolfssl: Fixes for building with OpenSSL compatibility layer
Resolves conflicts with building against wolfSSL when
`--enable-opensslextra` is set, namely the `WOLFSSL_HMAC_H_`,
`RNG` and `ASN1_*` name conflicts.

Closes strongswan/strongswan#151.
2019-09-26 09:06:11 +02:00
Tobias Brunner 095a2c2eac openssl: Don't manually seed DRBG with OpenSSL 1.1.1
According to the documentation, it's generally not necessary to manually
seed OpenSSL's DRBG (and it actually can cause the daemon to lock up
during start up on systems with low entropy if OpenSSL is already trying
to seed it itself and holds the lock).  While that might already have been
the case with earlier versions, it's not explicitly stated in their
documentation.  So we keep the code for these versions.
2019-09-24 16:42:46 +02:00
Tobias Brunner 55879d3200 travis: Bump OpenSSL to 1.1.1d 2019-09-24 16:38:56 +02:00
Tobias Brunner b0c84c7542 daemon: Correctly re-register custom loggers in set_level()
Fixes: 2080c7e1e2 ("charon: Add custom logger to daemon")
Fixes #3182.
2019-09-20 14:16:09 +02:00
worldofpeace 9b0cc5c5cb charon-nm: Move D-Bus conf file to $(datadir)/dbus-1/system.d
Since D-Bus 1.9.18 configuration files installed by third-party should
go in share/dbus-1/system.d. The old location is for sysadmin overrides.

Closes strongswan/strongswan#150.
2019-09-17 10:33:01 +02:00
Tobias Brunner a9fcf28007 conf: Fix typo in documentation of charon.rdn_matching
Fixes #3165.
2019-09-03 10:26:29 +02:00
Andreas Steffen 1e38151b30 Version bump to 5.8.1 2019-09-02 14:39:16 +02:00
Andreas Steffen 7cfe85cc85 Version bump to 5.8.1rc2 2019-08-29 11:15:18 +02:00
Andreas Steffen d2b771203f Version bump to 5.8.1rc1 2019-08-28 16:38:40 +02:00
Tobias Brunner 17c9972252 Fixed some typos, courtesy of codespell 2019-08-28 14:03:41 +02:00
Tobias Brunner 82cd511cc9 NEWS: Added some news for 5.8.1 2019-08-28 12:17:44 +02:00
Tobias Brunner 902f38dd3e ikev2: Check the length of received COOKIE notifies
As specified by RFC 7296, section 2.6, the data associated with COOKIE
notifications MUST be between 1 and 64 octets in length (inclusive).

Fixes #3160.
2019-08-28 12:15:27 +02:00
Tobias Brunner 8cd5f33dd8 libipsec: Fix compiler warning with GCC 9
The compiler complains that "taking address of packed member ... of
class or structure 'ip6_hdr' may result in an unaligned pointer value".
We don't care if the address is aligned as we explicitly use untoh16()
to convert the read value.
2019-08-28 11:10:49 +02:00
Tobias Brunner d6949b15ab cirrus: Run automated tests on FreeBSD via Cirrus CI 2019-08-28 11:10:49 +02:00
Tobias Brunner 535277afc5 Fix issue with $< automatic variable on FreeBSD
BSD make only evaluates $< for implicit rules, so building from the
repository won't work unless GNU make is installed and used, or we
replace affected uses like this.
2019-08-27 18:12:28 +02:00
Tobias Brunner 0a29ace908 Merge branch 'android-updates'
Some fixes for Android 9 (28) and other issues.  Also migrated to
AndroidX.

Closes strongswan/strongswan#148.
2019-08-26 11:29:09 +02:00
Tobias Brunner 3716af079e android: Avoid crash related to TileService on Huawei devices
No idea when exactly this happens but on many Huawei devices (and
only on them) it seems that onStartListening is sometimes called after
onDestroy i.e. when the database was already closed.  This caused an
InvalidStateException in getProfile via updateTile when retrieving the
current profile.  It's possible that it happens during shutdown (there
have been similar reports related to TileService implementations) so
users might not even notice, but it pollutes the Play Console, so this
workaround now makes sure the database is open when updateTile is called.
2019-08-26 11:28:16 +02:00
Tobias Brunner 8af50736e1 android: Fix null pointer dereference in TextInputLayoutHelper
The AndroidX/Material version of TextInputLayout actually supports a
helper text, but it is always shown, so we continue to use our version.
2019-08-26 11:20:48 +02:00
Tobias Brunner 9a305b7cbe android: Replace deprecated Html.fromHtml with version from AndroidX 2019-08-26 11:20:48 +02:00
Tobias Brunner 3b9696fc9b android: Migrate from support libraries to AndroidX
The support libraries will not be developed further.
2019-08-26 11:20:48 +02:00