]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
4 years agoMerge commit 'nm-client-id'
Tobias Brunner [Fri, 14 Feb 2020 13:47:34 +0000 (14:47 +0100)] 
Merge commit 'nm-client-id'

Makes the client's IKE identity configurable in the NM GUI.  For PSK
authentication the identity is now configured via that new field
and not the username anymore (old configs still work and are migrated
when edited).  The client identity now also defaults to the IP address
if not configured when using EAP/PSK.

Fixes #2581.

4 years agonm: Make local identity configurable
Tobias Brunner [Wed, 12 Feb 2020 10:39:07 +0000 (11:39 +0100)] 
nm: Make local identity configurable

For PSK authentication we now use the local identity and not the username
field.

4 years agocharon-nm: Add support for custom local IKE identities
Tobias Brunner [Wed, 12 Feb 2020 10:35:53 +0000 (11:35 +0100)] 
charon-nm: Add support for custom local IKE identities

4 years agoMerge branch 'nm-reauth'
Tobias Brunner [Fri, 14 Feb 2020 12:58:50 +0000 (13:58 +0100)] 
Merge branch 'nm-reauth'

With these changes, the NM service should be able to handle
reauthentication (and redirection) by switching to the new IKE_SA and
not considering the old SA going down an error.

Fixes #852.

4 years agocharon-nm: Keep listener registered even on failures
Tobias Brunner [Fri, 7 Feb 2020 14:22:31 +0000 (15:22 +0100)] 
charon-nm: Keep listener registered even on failures

NM doesn't seem to terminate the daemon on failures, so we might not get
further events for later retries.

4 years agocharon-nm: Support reauthentication and redirection
Tobias Brunner [Thu, 6 Feb 2020 16:36:46 +0000 (17:36 +0100)] 
charon-nm: Support reauthentication and redirection

4 years agoMerge branch 'nm-eap-tls'
Tobias Brunner [Fri, 14 Feb 2020 12:51:44 +0000 (13:51 +0100)] 
Merge branch 'nm-eap-tls'

Adds support for EAP-TLS to the NM plugin.  The certificates/key
source (file, smartcard, agent) can now be selected independently of
the authentication method (i.e. for both certificate and EAP-TLS auth).

Fixes #2097.

4 years agonm: Make EAP-TLS configurable
Tobias Brunner [Wed, 5 Feb 2020 15:01:08 +0000 (16:01 +0100)] 
nm: Make EAP-TLS configurable

A new combo field allows selecting where the certificate/key is stored.

4 years agocharon-nm: Add support for EAP-TLS
Tobias Brunner [Wed, 5 Feb 2020 15:00:10 +0000 (16:00 +0100)] 
charon-nm: Add support for EAP-TLS

The code is structured similar to that in the Android client, but two-round
authentication (cert+EAP) is not supported as that might require multiple
secrets ("password" is currently the only secret field used for every
method) and other details are currently missing too (like configurable
client identities).

4 years agoMerge branch 'nm-server-port'
Tobias Brunner [Fri, 14 Feb 2020 12:36:25 +0000 (13:36 +0100)] 
Merge branch 'nm-server-port'

Adds the option to use a custom server port in the NM plugin.

Fixes #625.

4 years agonm: Make server port configurable in GUI
Tobias Brunner [Thu, 19 Dec 2019 13:40:47 +0000 (14:40 +0100)] 
nm: Make server port configurable in GUI

4 years agocharon-nm: Add support for custom server ports
Tobias Brunner [Thu, 19 Dec 2019 13:40:11 +0000 (14:40 +0100)] 
charon-nm: Add support for custom server ports

4 years agoMerge branch 'nm-remote-id'
Tobias Brunner [Fri, 14 Feb 2020 12:29:10 +0000 (13:29 +0100)] 
Merge branch 'nm-remote-id'

This adds an optional field to the NM plugin to configure the server
identity, so it can differ from the address or certificate subject,
which are used by default.

It also updates the Glade file to GTK+ 3.2.

Closes strongswan/strongswan#57.

4 years agonm: Update German translation
Tobias Brunner [Tue, 17 Dec 2019 16:20:36 +0000 (17:20 +0100)] 
nm: Update German translation

4 years agonm: Make remote identity editable in GUI
Tobias Brunner [Tue, 17 Dec 2019 15:28:00 +0000 (16:28 +0100)] 
nm: Make remote identity editable in GUI

4 years agocharon-nm: Add support for a specific remote identity
Tobias Brunner [Tue, 17 Dec 2019 15:26:34 +0000 (16:26 +0100)] 
charon-nm: Add support for a specific remote identity

4 years agonm: Add hint regarding password storage policy
Tobias Brunner [Tue, 17 Dec 2019 15:16:08 +0000 (16:16 +0100)] 
nm: Add hint regarding password storage policy

Requires targeting GTK 3.2.

4 years agonm: Replace the term "gateway" with "server"
Tobias Brunner [Tue, 17 Dec 2019 15:03:08 +0000 (16:03 +0100)] 
nm: Replace the term "gateway" with "server"

4 years agonm: Update Glade file for GTK 3.0
Tobias Brunner [Tue, 17 Dec 2019 11:30:22 +0000 (12:30 +0100)] 
nm: Update Glade file for GTK 3.0

That's the version we check for in the configure script.

4 years agoconfigure: Depend on libip4tc instead of libiptc
Tobias Brunner [Thu, 13 Feb 2020 08:52:31 +0000 (09:52 +0100)] 
configure: Depend on libip4tc instead of libiptc

The libiptc meta-package apparently will be removed e.g. from Debian.
We currently only need IPv4 support in the connmark and forecast plugins.

Fixes #3338.

4 years agounit-tests: Increase timeout for test vectors suite
Tobias Brunner [Thu, 13 Feb 2020 15:42:13 +0000 (16:42 +0100)] 
unit-tests: Increase timeout for test vectors suite

These occasionally fail due to the current timeout on IBM Power on Travis.

4 years agoRevert "travis: Add workaround for a tox/virtualenv/six issue"
Tobias Brunner [Thu, 13 Feb 2020 15:34:27 +0000 (16:34 +0100)] 
Revert "travis: Add workaround for a tox/virtualenv/six issue"

This reverts commit d450e926de65e5517293d38ec3ad2a1a17020d05.

Was fixed by making tox depend on newer versions of six so the package
gets installed/updated automatically now when installing tox.  There is
also some ongoing work that tries to make virtualenv work with older
versions of six.

4 years agoenumerator: Fall back to lstat() if stat() fails when enumerating dirs/files
Tobias Brunner [Wed, 12 Feb 2020 16:37:34 +0000 (17:37 +0100)] 
enumerator: Fall back to lstat() if stat() fails when enumerating dirs/files

This happens e.g. if the path is for an invalid symlink.

4 years agocirrus: Remove bashisms from test script to make it compatible with /bin/sh
Tobias Brunner [Wed, 12 Feb 2020 16:49:14 +0000 (17:49 +0100)] 
cirrus: Remove bashisms from test script to make it compatible with /bin/sh

Bash is not installed on the FreeBSD images here and the location would
be different anyway (`/usr/local/bin/bash`, so we'd have to change the
hashbang to e.g. `/usr/bin/env bash`).

4 years agotravis: Add workaround for a tox/virtualenv/six issue
Tobias Brunner [Mon, 10 Feb 2020 13:48:02 +0000 (14:48 +0100)] 
travis: Add workaround for a tox/virtualenv/six issue

virtualenv is installed as dependency of tox and 20.0.0 added a
dependency on a newer version of six, which is not automatically
installed/updated.

4 years agoikev2: Fix spelling of routability
Josh Soref [Wed, 5 Feb 2020 09:13:22 +0000 (04:13 -0500)] 
ikev2: Fix spelling of routability

References strongswan/strongswan#164.

4 years agoSpelling fixes
Josh Soref [Wed, 5 Feb 2020 04:30:52 +0000 (23:30 -0500)] 
Spelling fixes

* accumulating
* acquire
* alignment
* appropriate
* argument
* assign
* attribute
* authenticate
* authentication
* authenticator
* authority
* auxiliary
* brackets
* callback
* camellia
* can't
* cancelability
* certificate
* choinyambuu
* chunk
* collector
* collision
* communicating
* compares
* compatibility
* compressed
* confidentiality
* configuration
* connection
* consistency
* constraint
* construction
* constructor
* database
* decapsulated
* declaration
* decrypt
* derivative
* destination
* destroyed
* details
* devised
* dynamic
* ecapsulation
* encoded
* encoding
* encrypted
* enforcing
* enumerator
* establishment
* excluded
* exclusively
* exited
* expecting
* expire
* extension
* filter
* firewall
* foundation
* fulfillment
* gateways
* hashing
* hashtable
* heartbeats
* identifier
* identifiers
* identities
* identity
* implementers
* indicating
* initialize
* initiate
* initiation
* initiator
* inner
* instantiate
* legitimate
* libraries
* libstrongswan
* logger
* malloc
* manager
* manually
* measurement
* mechanism
* message
* network
* nonexistent
* object
* occurrence
* optional
* outgoing
* packages
* packets
* padding
* particular
* passphrase
* payload
* periodically
* policies
* possible
* previously
* priority
* proposal
* protocol
* provide
* provider
* pseudo
* pseudonym
* public
* qualifier
* quantum
* quintuplets
* reached
* reading
* recommendation to
* recommendation
* recursive
* reestablish
* referencing
* registered
* rekeying
* reliable
* replacing
* representing
* represents
* request
* request
* resolver
* result
* resulting
* resynchronization
* retriable
* revocation
* right
* rollback
* rule
* rules
* runtime
* scenario
* scheduled
* security
* segment
* service
* setting
* signature
* specific
* specified
* speed
* started
* steffen
* strongswan
* subjectaltname
* supported
* threadsafe
* traffic
* tremendously
* treshold
* unique
* uniqueness
* unknown
* until
* upper
* using
* validator
* verification
* version
* version
* warrior

Closes strongswan/strongswan#164.

4 years agopem: Support parsing PEM-encoded Ed448 keys
Tobias Brunner [Mon, 20 Jan 2020 18:11:18 +0000 (19:11 +0100)] 
pem: Support parsing PEM-encoded Ed448 keys

4 years agopki: Add support for Ed448 keys/certificates
Tobias Brunner [Mon, 20 Jan 2020 18:08:14 +0000 (19:08 +0100)] 
pki: Add support for Ed448 keys/certificates

4 years agoopenssl: Support certificates with Ed25519/448 keys
Tobias Brunner [Mon, 20 Jan 2020 16:58:34 +0000 (17:58 +0100)] 
openssl: Support certificates with Ed25519/448 keys

4 years agopkcs1: Support parsing Ed448 public keys
Tobias Brunner [Mon, 20 Jan 2020 16:53:31 +0000 (17:53 +0100)] 
pkcs1: Support parsing Ed448 public keys

4 years agonm: Replace deprecated g_type_class_add_private()
Tobias Brunner [Mon, 16 Dec 2019 12:55:39 +0000 (13:55 +0100)] 
nm: Replace deprecated g_type_class_add_private()

Fixes #2765, #3197.

4 years agosoup: Use soup_session_new() to avoid deprecation warning
Tobias Brunner [Thu, 12 Dec 2019 16:29:08 +0000 (17:29 +0100)] 
soup: Use soup_session_new() to avoid deprecation warning

There are a ton of libsoup/GLib-related "leaks" that we can't whitelist
and with leak detective active there is a delay that interestingly doesn't
happen with soup_session_sync_new(), so tests failed with a timeout (actually
they hung due to the lock in the fetcher manager).
On Travis, the curl plugin is used for the tests, so that's not an issue
there (and without LD the tests complete quickly and successfully).

4 years agotravis: Build soup plugin
Tobias Brunner [Thu, 12 Dec 2019 12:54:44 +0000 (13:54 +0100)] 
travis: Build soup plugin

We disabled this due to issues with the GLib version shipped with
Ubuntu 12.04 (see ab23a0f86a4b).

4 years agovici: Options are optional in get_pools() of Python bindings
Tobias Brunner [Thu, 23 Jan 2020 09:35:23 +0000 (10:35 +0100)] 
vici: Options are optional in get_pools() of Python bindings

Fixes #3319.

4 years agolibtpmtss: Fix problematic usage of chunk_from_chars() in TSS2 implementations
Tobias Brunner [Wed, 29 Jan 2020 10:22:07 +0000 (11:22 +0100)] 
libtpmtss: Fix problematic usage of chunk_from_chars() in TSS2 implementations

See 8ea13bbc5ccd for details.

References #3249.

4 years agox509: Replace problematic calls of chunk_from_chars() for keyUsage extension
Tobias Brunner [Wed, 29 Jan 2020 10:12:12 +0000 (11:12 +0100)] 
x509: Replace problematic calls of chunk_from_chars() for keyUsage extension

As noted in 8ea13bbc5ccd newer compilers might optimize out the
assignment leading to invalid values in the keyUsage extension (as the
length was still set, the extension was encoded, just not with the
intended values).

Fixes #3249.

4 years agopki: Remove unnecessary and problematic chunk_from_chars() usage in --signcrl
Tobias Brunner [Wed, 29 Jan 2020 10:05:30 +0000 (11:05 +0100)] 
pki: Remove unnecessary and problematic chunk_from_chars() usage in --signcrl

If the serial is not yet set, the same default value is set just below.

See 8ea13bbc5ccd for details on chunk_from_chars().

References #3249.

4 years agotls-crypto: Fix usage of chunk_from_chars()
Tobias Brunner [Wed, 29 Jan 2020 09:02:38 +0000 (10:02 +0100)] 
tls-crypto: Fix usage of chunk_from_chars()

See 8ea13bbc5ccd for details.

References #3249.

4 years agolgtm: Build external dependencies for a more complete analysis
Tobias Brunner [Thu, 30 Jan 2020 10:09:04 +0000 (11:09 +0100)] 
lgtm: Build external dependencies for a more complete analysis

The build system is a bit limited, only the repository directory and
LGTM_WORKSPACE is writable.  sudo doesn't work at all, for others we
don't have enough permission.

4 years agowolfssl: Use pkg-config to check for wolfSSL
Tobias Brunner [Thu, 30 Jan 2020 12:55:51 +0000 (13:55 +0100)] 
wolfssl: Use pkg-config to check for wolfSSL

The other checks trigger an automatic install of the old and incompatible
Ubuntu package on LGTM.

4 years agolibtpmtss: Only check for legacy TSS2 libs if newer are not found
Tobias Brunner [Thu, 30 Jan 2020 12:49:10 +0000 (13:49 +0100)] 
libtpmtss: Only check for legacy TSS2 libs if newer are not found

On LGTM, legacy packages are installed automatically otherwise.

4 years agotravis: tpm2-tss switched the default crypto backend to OpenSSL with 2.2.0
Tobias Brunner [Thu, 30 Jan 2020 10:53:41 +0000 (11:53 +0100)] 
travis: tpm2-tss switched the default crypto backend to OpenSSL with 2.2.0

4 years agotravis: Trigger code review on lgtm.com
Tobias Brunner [Tue, 28 Jan 2020 15:15:45 +0000 (16:15 +0100)] 
travis: Trigger code review on lgtm.com

Only the master (daily) and pull requests are scanned automatically.

4 years agoconf: Complete ordering functions for ConfigOption class
Tobias Brunner [Wed, 29 Jan 2020 12:23:57 +0000 (13:23 +0100)] 
conf: Complete ordering functions for ConfigOption class

4 years agopkcs11: Avoid naming conflict with method parameter
Tobias Brunner [Tue, 28 Jan 2020 13:58:27 +0000 (14:58 +0100)] 
pkcs11: Avoid naming conflict with method parameter

4 years agosystime-fix: Replace asctime() with thread-safe asctime_r()
Tobias Brunner [Tue, 28 Jan 2020 13:55:25 +0000 (14:55 +0100)] 
systime-fix: Replace asctime() with thread-safe asctime_r()

According to the man page, the buffer should have room for at least
26 characters.

4 years agoload-tester: Avoid naming conflict with local certificate variables
Tobias Brunner [Tue, 28 Jan 2020 13:41:15 +0000 (14:41 +0100)] 
load-tester: Avoid naming conflict with local certificate variables

4 years agosw-collector: Avoid naming conflicts with local count variables
Tobias Brunner [Tue, 28 Jan 2020 13:38:27 +0000 (14:38 +0100)] 
sw-collector: Avoid naming conflicts with local count variables

4 years agoeap-aka-3gpp2: Fix a bunch of typos
Tobias Brunner [Tue, 28 Jan 2020 13:32:52 +0000 (14:32 +0100)] 
eap-aka-3gpp2: Fix a bunch of typos

4 years agoeap-aka-3gpp2: Avoid naming conflict with parameters of crypto functions
Tobias Brunner [Tue, 28 Jan 2020 13:32:38 +0000 (14:32 +0100)] 
eap-aka-3gpp2: Avoid naming conflict with parameters of crypto functions

4 years agoeap-aka-3gpp2: Avoid naming conflict with local AMF variable
Tobias Brunner [Tue, 28 Jan 2020 13:45:36 +0000 (14:45 +0100)] 
eap-aka-3gpp2: Avoid naming conflict with local AMF variable

4 years agopool: Avoid conflict with start/end variables used in many commands
Tobias Brunner [Tue, 28 Jan 2020 13:26:11 +0000 (14:26 +0100)] 
pool: Avoid conflict with start/end variables used in many commands

4 years agoaesni: Namespace include guard for AES-CMAC
Tobias Brunner [Tue, 28 Jan 2020 12:56:58 +0000 (13:56 +0100)] 
aesni: Namespace include guard for AES-CMAC

Was the same as in the cmac plugin.

4 years agotls-prf: Remove unused/undeclared argument in TLS 1.0/1.1 PRF constructor
Tobias Brunner [Tue, 28 Jan 2020 12:55:24 +0000 (13:55 +0100)] 
tls-prf: Remove unused/undeclared argument in TLS 1.0/1.1 PRF constructor

4 years agopki: Avoid naming conflict with global variables for passed arguments
Tobias Brunner [Tue, 28 Jan 2020 10:36:11 +0000 (11:36 +0100)] 
pki: Avoid naming conflict with global variables for passed arguments

4 years agoscepclient: Avoid name conflict with global PKCS#7 chunk
Tobias Brunner [Tue, 28 Jan 2020 10:33:31 +0000 (11:33 +0100)] 
scepclient: Avoid name conflict with global PKCS#7 chunk

Use the same name as further down below in the file.

Fixes: 04ff78aa33b1 ("scepclient: Store received RA certificates, using CA cert name as base.")
4 years agostarter: Avoid hiding global variable when checking PID file
Tobias Brunner [Tue, 28 Jan 2020 10:30:23 +0000 (11:30 +0100)] 
starter: Avoid hiding global variable when checking PID file

4 years agocopyright: Make strings static const
Tobias Brunner [Tue, 28 Jan 2020 10:17:22 +0000 (11:17 +0100)] 
copyright: Make strings static const

They are not used anywhere else.

4 years agoplugin-constructors: Remove unused import for `sys`
Tobias Brunner [Tue, 28 Jan 2020 10:18:28 +0000 (11:18 +0100)] 
plugin-constructors: Remove unused import for `sys`

4 years agovici: Remove unused import in Python bindings
Tobias Brunner [Tue, 28 Jan 2020 10:20:48 +0000 (11:20 +0100)] 
vici: Remove unused import in Python bindings

4 years agovici: Remove unnecessary `pass` statement
Tobias Brunner [Tue, 28 Jan 2020 10:12:45 +0000 (11:12 +0100)] 
vici: Remove unnecessary `pass` statement

4 years agoarray: Avoid overflow in size calculation
Tobias Brunner [Tue, 28 Jan 2020 10:06:59 +0000 (11:06 +0100)] 
array: Avoid overflow in size calculation

While it's unlikely that so many (large) items are allocated, this is
technically more correct.  The result previously could overflow an
unsigned int (the conversion to size_t happened afterwards).

4 years agoswanctl: Add missing header guards for load commands
Tobias Brunner [Tue, 28 Jan 2020 09:55:46 +0000 (10:55 +0100)] 
swanctl: Add missing header guards for load commands

4 years agoswanctl: Add missing `extern` for `swanctl_dir` variable in header
Tobias Brunner [Tue, 28 Jan 2020 09:33:55 +0000 (10:33 +0100)] 
swanctl: Add missing `extern` for `swanctl_dir` variable in header

This clearly never was correct, but didn't cause problems so far.
However, GCC 10 will default to `-fno-common` instead of
`-fcommon` (https://gcc.gnu.org/PR85678), so compilation there fails
with something like:

```
libtool: link: gcc ... -o .libs/swanctl ...
ld: commands/load_authorities.o:strongswan/src/swanctl/./swanctl.h:33:
  multiple definition of `swanctl_dir'; commands/load_all.o:strongswan/src/swanctl/./swanctl.h:33: first defined here
```

Fixes: 501bd53a6cce ("swanctl: Make credential directories relative to swanctl.conf")
Closes strongswan/strongswan#163.

4 years agolgtm: Add query to detect problematic uses of chunk_from_chars()
Tobias Brunner [Mon, 27 Jan 2020 14:16:51 +0000 (15:16 +0100)] 
lgtm: Add query to detect problematic uses of chunk_from_chars()

GCC 9+ and clang 4+ (partially) optimize out usages of
chunk_from_chars() if the value is read outside of the block where the
macro is used.  For instance:

```
chunk_t chunk = chunk_empty;
if (...)
{
chunk = chunk_from_chars(0x01, 0x06);
}
/* do something with chunk */
```

The chunk_from_chars() macro expands to a chunk_t declaration, which is
technically only defined inside that block.

Still, with older GCC versions the fourth line was compiled to something
like this:

```
mov     WORD PTR [rsp+14], 1537 # 0x0106 in little-endian
lea     rdx, [rsp+14]
mov     ecx, 2
```

However, with GCC 9.1 and -O2 the first instruction might be omitted
(strangely the others usually were not, so the chunk pointed to whatever
was stored on the stack).  It's not easily reproducible, so there are
situations where the seemingly identical code is not optimized in this
way.

This query should detect such problematic uses of the macro (definition
and usage in different blocks).

References #3249.

4 years agolgtm: Add config for a more complete build on lgtm.com
Tobias Brunner [Mon, 27 Jan 2020 14:03:58 +0000 (15:03 +0100)] 
lgtm: Add config for a more complete build on lgtm.com

4 years agotravis: Build on ARM64, IBM Power and IBM Z architectures
Tobias Brunner [Wed, 15 Jan 2020 13:57:56 +0000 (14:57 +0100)] 
travis: Build on ARM64, IBM Power and IBM Z architectures

IBM Z is big-endian, IBM Power runs in little-endian mode.

Botan requires a fix for issues with GCC and amalgamation enabled (target
pragma ‘*’ is invalid) on ARM64 and IBM Power, while wolfSSL can't be
compiled successfully on IBM Z without an additional patch.

libunwind is not available for x390x, but since we explicitly disable
such backtraces it's not necessary anyway.

4 years agosha3: Fix readLane() macro on big-endian platforms
Tobias Brunner [Thu, 16 Jan 2020 15:06:27 +0000 (16:06 +0100)] 
sha3: Fix readLane() macro on big-endian platforms

4 years agoUse Botan 2.13.0 for tests
Tobias Brunner [Wed, 15 Jan 2020 09:23:35 +0000 (10:23 +0100)] 
Use Botan 2.13.0 for tests

4 years agoscepclient: Add missing short options (-i, -T)
Tobias Brunner [Wed, 15 Jan 2020 11:00:28 +0000 (12:00 +0100)] 
scepclient: Add missing short options (-i, -T)

4 years agoMerge branch 'vici-pytest'
Tobias Brunner [Tue, 14 Jan 2020 15:53:53 +0000 (16:53 +0100)] 
Merge branch 'vici-pytest'

Adds tox.ini to test with tox (which is now used on Travis) and includes
the tests in the source distribution.

4 years agovici: Move Python test dir and include it in sdist
Tobias Brunner [Tue, 14 Jan 2020 13:58:01 +0000 (14:58 +0100)] 
vici: Move Python test dir and include it in sdist

This is the recommended location and import config as it allows running the
tests against installed versions of the package.  And while the test file
itself is automatically included in the source distribution this way, the
__init__.py file is not, so we still have to update MANIFEST.in.

4 years agotravis: Run python tests with tox
Tobias Brunner [Tue, 14 Jan 2020 10:02:07 +0000 (11:02 +0100)] 
travis: Run python tests with tox

4 years agovici: Run Python tests via tox if available
Tobias Brunner [Tue, 14 Jan 2020 10:00:56 +0000 (11:00 +0100)] 
vici: Run Python tests via tox if available

Since we use the serial test harness we can't use AM_TESTS_ENVIRONMENT.
The script is necessary for out-of-tree builds.

4 years agovici: Fix several PEP8 issues
Tobias Brunner [Tue, 14 Jan 2020 10:03:07 +0000 (11:03 +0100)] 
vici: Fix several PEP8 issues

4 years agovici: Add tox.ini to run tests with tox
Tobias Brunner [Tue, 14 Jan 2020 09:49:47 +0000 (10:49 +0100)] 
vici: Add tox.ini to run tests with tox

Some of the interpreters might not be available on the host system, use
--skip-missing-interpreters to not fail in that case.

4 years agovici: List newer Python versions in setup.py
Tobias Brunner [Tue, 14 Jan 2020 09:48:53 +0000 (10:48 +0100)] 
vici: List newer Python versions in setup.py

4 years agotravis: Bump wolfSSL to 4.3.0
Tobias Brunner [Mon, 13 Jan 2020 13:39:21 +0000 (14:39 +0100)] 
travis: Bump wolfSSL to 4.3.0

4 years agowolfssl: Undef RSA_PSS_SALT_LEN_DEFAULT as wolfSSL 4.3.0 defines it as enum
Tobias Brunner [Mon, 13 Jan 2020 14:48:47 +0000 (15:48 +0100)] 
wolfssl: Undef RSA_PSS_SALT_LEN_DEFAULT as wolfSSL 4.3.0 defines it as enum

4 years agoRevert "travis: Add a workaround for a bug regarding libtool installed via Homebrew"
Tobias Brunner [Thu, 19 Dec 2019 10:41:59 +0000 (11:41 +0100)] 
Revert "travis: Add a workaround for a bug regarding libtool installed via Homebrew"

This reverts commit 1806ba0890bc503df3dacf01992ec1bca2b0fbb0 as the
workaround is not required anymore and now actually fails because
pre-installed tools have a dependency on libtool.

4 years agoVersion bump to 5.8.2 5.8.2
Andreas Steffen [Tue, 17 Dec 2019 13:30:41 +0000 (14:30 +0100)] 
Version bump to 5.8.2

4 years agoVersion bump to 5.8.2rc2 5.8.2rc2
Andreas Steffen [Mon, 16 Dec 2019 21:11:43 +0000 (22:11 +0100)] 
Version bump to 5.8.2rc2

4 years agokernel-netlink: Use correct config option name for HW offloading check
Tobias Brunner [Fri, 13 Dec 2019 16:19:03 +0000 (17:19 +0100)] 
kernel-netlink: Use correct config option name for HW offloading check

Fixes: a605452c038e ("kernel-netlink: Check for offloading support in constructor")
4 years agodrbg: Fix Doxygen group in headers
Tobias Brunner [Tue, 10 Dec 2019 16:12:32 +0000 (17:12 +0100)] 
drbg: Fix Doxygen group in headers

4 years agoFixed some typos, courtesy of codespell
Tobias Brunner [Tue, 10 Dec 2019 16:06:53 +0000 (17:06 +0100)] 
Fixed some typos, courtesy of codespell

4 years agoNEWS: Added some news for 5.8.2
Tobias Brunner [Tue, 10 Dec 2019 14:52:05 +0000 (15:52 +0100)] 
NEWS: Added some news for 5.8.2

4 years agoopenssl: Make some additional arguments const
Thomas Egerer [Fri, 29 Nov 2019 18:05:37 +0000 (19:05 +0100)] 
openssl: Make some additional arguments const

Related to openssl 1.1.x changes.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
4 years agolibtpmtss: Convert RSA exponent to big-endian when provided by a TPM 2.0
Tobias Brunner [Tue, 10 Dec 2019 09:12:48 +0000 (10:12 +0100)] 
libtpmtss: Convert RSA exponent to big-endian when provided by a TPM 2.0

While the TPM expects and returns the data in big-endian, the SAPI
implementation converts it to native-endianness.  As stated in the
SAPI specification (section 3.2):

  8. All SAPI data SHALL be in native-endian format.  This means that
     the SAPI implementation will do any endian conversion required for
     both inputs and outputs.

So to use the exponent in a chunk we have to convert it to big-endian again.

Fixes: 7533cedb9a8a ("libtpmtss: Read RSA public key exponent instead of assuming its value")
4 years agoikev2: Destroy IKE_SA if INVALID_SYNTAX notify is received in response
Tobias Brunner [Mon, 25 Nov 2019 14:55:54 +0000 (15:55 +0100)] 
ikev2: Destroy IKE_SA if INVALID_SYNTAX notify is received in response

RFC 7296, section 2.21.3:

   If a peer parsing a request notices that it is badly formatted (after
   it has passed the message authentication code checks and window
   checks) and it returns an INVALID_SYNTAX notification, then this
   error notification is considered fatal in both peers, meaning that
   the IKE SA is deleted without needing an explicit Delete payload.

4 years agoikev2: Destroy IKE_SA when receiving invalid authenticated requests
Tobias Brunner [Mon, 25 Nov 2019 13:43:36 +0000 (14:43 +0100)] 
ikev2: Destroy IKE_SA when receiving invalid authenticated requests

RFC 7296, section 2.21.3:

   If a peer parsing a request notices that it is badly formatted (after
   it has passed the message authentication code checks and window
   checks) and it returns an INVALID_SYNTAX notification, then this
   error notification is considered fatal in both peers, meaning that
   the IKE SA is deleted without needing an explicit Delete payload.

4 years agoikev2: Send INVALID_MAJOR_VERSION notify using the same exchange type and MID
Tobias Brunner [Mon, 25 Nov 2019 13:00:40 +0000 (14:00 +0100)] 
ikev2: Send INVALID_MAJOR_VERSION notify using the same exchange type and MID

This is per RFC 7296, section 1.5.

4 years agosshkey: Rename variables that conflict with function argument
Tobias Brunner [Mon, 9 Dec 2019 10:34:30 +0000 (11:34 +0100)] 
sshkey: Rename variables that conflict with function argument

4 years agochunk: Rename hash key variable to avoid conflicts with function arguments
Tobias Brunner [Mon, 9 Dec 2019 10:22:14 +0000 (11:22 +0100)] 
chunk: Rename hash key variable to avoid conflicts with function arguments

4 years agoattr: Remove unused/undeclared argument in provider constructor
Tobias Brunner [Mon, 9 Dec 2019 10:05:25 +0000 (11:05 +0100)] 
attr: Remove unused/undeclared argument in provider constructor

4 years agoVersion bump to 5.8.2rc1 5.8.2rc1
Andreas Steffen [Sat, 7 Dec 2019 22:06:22 +0000 (23:06 +0100)] 
Version bump to 5.8.2rc1

4 years agoconfigure: Drop unnecessary gperf version check
Tobias Brunner [Thu, 5 Dec 2019 14:50:12 +0000 (15:50 +0100)] 
configure: Drop unnecessary gperf version check

While the check probably made sense when strongSwan 4.x was started, gperf
version 3.0.1 was released in 2003, so it's very unlikely that version 2.x
is still around anywhere.

4 years agoconfigure: Abort if gperf is not found but generated files don't exist
Tobias Brunner [Thu, 5 Dec 2019 14:46:15 +0000 (15:46 +0100)] 
configure: Abort if gperf is not found but generated files don't exist

When building from a tarball gperf is not required as the generated
files already exist, however, when building from the repository that's
not the case, so warn the user if gperf is not found.

4 years agoconfigure: Declare GPERF and PERL as variables
Tobias Brunner [Thu, 5 Dec 2019 14:45:01 +0000 (15:45 +0100)] 
configure: Declare GPERF and PERL as variables

These are documented in --help and will be cached.

4 years agokernel-netlink: Properly compare routes for policies without gateway/netxhop
Tobias Brunner [Thu, 5 Dec 2019 15:15:33 +0000 (16:15 +0100)] 
kernel-netlink: Properly compare routes for policies without gateway/netxhop

This happened when installing a duplicate bypass policy for a locally
connected subnet.  The destructor and the kernel-net part already
handle this correctly.