Commit Graph

272 Commits

Author SHA1 Message Date
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
Tobias Brunner d4c337a42f Use Botan 2.18.0 for tests 2021-05-07 14:48:17 +02:00
Tobias Brunner a730873211 github: Fix python build and checks on older Ubuntu releases
On 18.04, setuptools was apparently pulled in by python-pip but is not
by python3-pip and on Ubuntu 16.04 there is an issue with tox when
installed via pip3 (syntax error in one of the dependencies) and with
pip that dependency is not even available.
2021-05-06 15:16:42 +02:00
Tobias Brunner 2f650e085b github: Don't fail LGTM test with an error if variables are missing
That's because forks are currently not allowed to be analyzed by LGTM (unlike
with SonarCloud) so this check can't actually be successful for forks even if
variables are defined.

References strongswan/strongswan#328.
2021-05-05 19:11:38 +02:00
Noel Kuntze 260e7b55f6 github: Fail LGTM test if required environment variables aren't set
Closes strongswan/strongswan#328.
2021-05-05 18:12:25 +02:00
Tobias Brunner cd7b80e869 github: Make LGTM project ID configurable via environment variable 2021-05-05 18:09:44 +02:00
Noel Kuntze f830e71457 github: Fail sonarcloud test if required environment variables aren't set
Closes strongswan/strongswan#330.
2021-05-05 18:10:03 +02:00
Tobias Brunner 742e0f213c github: Fix build on Ubuntu 20.04 and add a job for 18.04
The nm test can only be done on Ubuntu 18.04 as the required libraries
are not available on newer systems.

Switch to pip3 to install tox (the only Python dependency we use).

Closes strongswan/strongswan#327.
2021-05-05 18:09:44 +02:00
Tobias Brunner 82116dba66 tls-test: Add option to make client authentication optional 2021-02-18 15:39:35 +01:00
Tobias Brunner 11a4687930 libtls: Add control flags and replace GENERIC_NULLOK purpose with one 2021-02-18 15:10:29 +01:00
Tobias Brunner cb85967655 github: Bump wolfSSL to 4.7.0 2021-02-16 09:08:12 +01:00
Tobias Brunner 663969ddf7 libtls: Make min/max TLS version configurable
Except for the tls_test tool, the versions now default to those
configured in strongswan.conf.
2021-02-12 14:35:23 +01:00
Pascal Knecht 299cc80094 tls-test: Add support to require/verify client certificates
Also add detailed usage output with description of all options.
2021-02-12 14:35:23 +01:00
Pascal Knecht 5e579ebe8f tls-test: Load keys of any type
Only RSA keys were possible until now.
2021-02-12 14:35:23 +01:00
Tobias Brunner 06aad98ff0 tls-test: Make plugin list configurable via environment variable 2021-02-12 14:35:23 +01:00
Tobias Brunner 8e35b1f1a5 tls-test: Add options to configure TLS versions 2021-02-12 11:45:44 +01:00
Tobias Brunner a7f2818832 tls-socket: Allow configuring both minimum and maximum TLS versions 2021-02-12 11:45:44 +01:00
Tobias Brunner 4099035a0c tls-test: Make address family configurable and simplify DNS/socket handling 2021-02-12 11:45:44 +01:00
bytinbit 7a2b02667c libtls: Implement TLS 1.3 handshake on client-side
The code is a minimal handshake with the HelloRetryRequest message
implementation missing.
Can be tested with an OpenSSL server running TLS 1.3. The server must
be at least version 1.1.1 (September 2018).

Co-authored-by: ryru <pascal.knecht@hsr.ch>
2021-02-12 11:45:44 +01:00
Tobias Brunner a5f4b996bf appveyor: Also build against newer OpenSSL versions
The original version is 1.0.2, which we keep as that version is not in
use on other platforms anymore.
2021-01-27 16:32:43 +01:00
Michał Skalski 14a0c08235 Enable Windows CI build of pkcs11 plugin 2021-01-27 16:32:43 +01:00
Tobias Brunner 8d8739ace6 github: Enable farp plugin on macOS 2021-01-22 10:44:05 +01:00
Tobias Brunner 1af4ae8732 cirrus: Build farp plugin on FreeBSD 2021-01-22 10:44:05 +01:00
Tobias Brunner 839d6c8f80 github: Bump wolfSSL to 4.6.0
Also enables Brainpool curves (this only enables the BP curves, while
--enable-ecccustcurves=all would also enable several others we don't support).
2021-01-04 16:09:58 +01:00
Tobias Brunner 51f4837628 cirrus: Build against tpm2-tss on FreeBSD
This was enabled in the port too.
2020-12-15 10:42:43 +01:00
Tobias Brunner de401e0e89 github: Migrate from Travis CI to Github Actions
On travis-ci.com (travis-ci.org will be discontinued by the end of the
year) we are now charged for each minute.  We only got 10000 credits in
a trial plan, which we used up with a few builds.  Minutes also cost a
different amount of credits on different platforms: 10 on Linux,
but 50 on macOS (installing the dependencies on macOS alone took 12-15
minutes on Travis for some reason, takes about half on Github's runners).

No native Windows build yet as we have the same issue as on AppVeyor where
threading/streaming tests might get stuck.  And there is also only a
single Windows platform to test on.  Plus building/testing on Windows is
very slow (and getting ccache to work seems tricky).

The 'sw_collector' test case had to be disabled because we can't access
/usr/local/share on the Github build hosts (the process is just blocked
in readdir() and eventually times out).

Unfortunately, we can't test on different architectures anymore (in
particular ARM and the big-endian IBM Z/x390x).
2020-12-15 10:42:43 +01:00
Tobias Brunner 29c59885ca Use Botan 2.17.1 for tests 2020-11-27 12:05:22 +01:00
Tobias Brunner 78015d14ac Use Botan 2.16.0 for tests 2020-10-07 12:38:52 +02:00
Tobias Brunner ddc5b92dfb travis: Bump tpm2-tss to 2.4.3 2020-09-24 08:52:22 +02:00
Tobias Brunner fd5cf31108 travis: Read project/organization for SonarCloud from environment variable 2020-09-09 13:25:30 +02:00
Tobias Brunner e96f58568e travis: Bump wolfSSL to 4.5.0 2020-08-31 17:49:10 +02:00
Tobias Brunner 03a495f6fc travis: Bump tpm2-tss to 2.4.2 2020-08-17 13:45:15 +02:00
Tobias Brunner 59455137b4 Use Botan 2.15.0 for tests 2020-07-20 16:58:03 +02:00
Tobias Brunner 2e522952c7 configure: Optionally use version information obtained from Git in executables
The variable GIT_VERSION is always defined, either obtained from Git or
a file that is embedded in tarballs when they are built.  Optionally,
that version is declared as VERSION in config.h so it will be used e.g. in
the daemons when they print the version number.

There is a check that should catch missing tags (i.e. if the version number
in AC_INIT() isn't a prefix of the version obtained via Git).
2020-07-20 14:10:52 +02:00
Tobias Brunner 4b225bf866 travis: Don't pipe negative lgtm.com result into jq
The data might not be valid JSON.
2020-06-11 13:29:47 +02:00
Tobias Brunner 763f07c531 travis: Add build of the Android app 2020-06-02 14:42:38 +02:00
Tobias Brunner 0ff939585e travis: Bump tpm2-tss to 2.4.1
Manually built dependencies are now built in a separate step after
packages have been installed as they might depend themselves on some
packages (e.g. tpm2-tss, which now requires libjson-c).
2020-05-26 11:06:07 +02:00
Tobias Brunner 7ae4ced06f travis: Bump wolfSSL to 4.4.0
SHA-3 is only automatically enabled on x86/x64.  The tests are disabled
because we don't need them and they currently cause a compile warning/error
when built with clang on x64 (sizeof() on a pointer to an array).  If the
examples are enabled, another test suite is built, which includes the
disabled crypto tests.
2020-05-07 09:50:45 +02:00
Tobias Brunner b3e7b79cc5 scripts: Initialize libstrongswan in id2sql to fix a crash
Since 770f4ccee1 ("identification: Optionally match RDNs in any order
and accept missing RDNs") the DN parser requires lib->settings.
2020-05-04 17:00:45 +02:00
Tobias Brunner e0b1b12028 Use Botan 2.14.0 for tests
Requires at least GCC 5.0 to build with `--amalgamation`, so it's
disabled for our Ubuntu 16.04 build.
2020-04-07 16:37:27 +02:00
Tobias Brunner 0399314903 script: Fix upper bounds
^ is the XOR operator.
2020-03-04 17:07:32 +01:00
Tobias Brunner e1cc667920 pubkey-speed: Add sanity check for the number of rounds
The allocated buffer for the signatures is based on this, which LGTM
doesn't like.
2020-03-03 11:34:22 +01:00
Tobias Brunner 7a13246668 crypt-burn: Add sanity check for buffer length
This value is passed to chunk_alloc(), which LGTM complains about.
2020-03-03 11:32:31 +01:00
Tobias Brunner 1f2c83db61 travis: Enable caching for sonarcloud scan 2020-02-21 16:11:44 +01:00
Tobias Brunner 89e5eb7213 travis: Bump tpm2-tss to 2.3.3 2020-02-21 09:52:49 +01:00
Tobias Brunner 658b6df4d8 travis: Add build tests for NM plugin 2020-02-14 14:53:26 +01:00
Tobias Brunner ead067e775 Revert "travis: Add workaround for a tox/virtualenv/six issue"
This reverts commit d450e926de.

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.
2020-02-13 16:34:27 +01:00
Tobias Brunner fdce492ed0 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`).
2020-02-13 10:23:30 +01:00
Tobias Brunner d450e926de 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.
2020-02-12 11:20:02 +01:00
Tobias Brunner 5833bc4b9c travis: Build soup plugin
We disabled this due to issues with the GLib version shipped with
Ubuntu 12.04 (see ab23a0f86a).
2020-02-05 10:49:20 +01:00