17547 Commits

Author SHA1 Message Date
Tobias Brunner
0f141fb095 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).
2020-02-05 10:49:35 +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 ab23a0f86a4b).
2020-02-05 10:49:20 +01:00
Tobias Brunner
f78dfb7e28 vici: Options are optional in get_pools() of Python bindings
Fixes #3319.
2020-02-03 10:52:31 +01:00
Tobias Brunner
ef4113a49d libtpmtss: Fix problematic usage of chunk_from_chars() in TSS2 implementations
See 8ea13bbc5ccd for details.

References #3249.
2020-01-30 18:18:33 +01:00
Tobias Brunner
776433505b 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.
2020-01-30 18:18:28 +01:00
Tobias Brunner
d16e810778 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.
2020-01-30 18:18:14 +01:00
Tobias Brunner
d5cf2d1f85 tls-crypto: Fix usage of chunk_from_chars()
See 8ea13bbc5ccd for details.

References #3249.
2020-01-30 18:18:06 +01:00
Tobias Brunner
da9e4fa04b 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.
2020-01-30 17:12:48 +01:00
Tobias Brunner
2cb4af6696 wolfssl: Use pkg-config to check for wolfSSL
The other checks trigger an automatic install of the old and incompatible
Ubuntu package on LGTM.
2020-01-30 17:12:05 +01:00
Tobias Brunner
04ce39e7c0 libtpmtss: Only check for legacy TSS2 libs if newer are not found
On LGTM, legacy packages are installed automatically otherwise.
2020-01-30 15:37:45 +01:00
Tobias Brunner
ed8430630f travis: tpm2-tss switched the default crypto backend to OpenSSL with 2.2.0 2020-01-30 15:37:45 +01:00
Tobias Brunner
c9a3430368 travis: Trigger code review on lgtm.com
Only the master (daily) and pull requests are scanned automatically.
2020-01-30 15:37:45 +01:00
Tobias Brunner
48017a2740 conf: Complete ordering functions for ConfigOption class 2020-01-29 13:31:42 +01:00
Tobias Brunner
1147973661 pkcs11: Avoid naming conflict with method parameter 2020-01-28 15:32:43 +01:00
Tobias Brunner
18a3e6d80f systime-fix: Replace asctime() with thread-safe asctime_r()
According to the man page, the buffer should have room for at least
26 characters.
2020-01-28 15:32:43 +01:00
Tobias Brunner
584e8197fe load-tester: Avoid naming conflict with local certificate variables 2020-01-28 15:32:43 +01:00
Tobias Brunner
a7126dd47e sw-collector: Avoid naming conflicts with local count variables 2020-01-28 15:32:43 +01:00
Tobias Brunner
f168f5782b eap-aka-3gpp2: Fix a bunch of typos 2020-01-28 15:32:43 +01:00
Tobias Brunner
378fe7a4bf eap-aka-3gpp2: Avoid naming conflict with parameters of crypto functions 2020-01-28 15:32:43 +01:00
Tobias Brunner
719cfc7846 eap-aka-3gpp2: Avoid naming conflict with local AMF variable 2020-01-28 15:32:43 +01:00
Tobias Brunner
b7019a5c9e pool: Avoid conflict with start/end variables used in many commands 2020-01-28 15:32:43 +01:00
Tobias Brunner
26f20cc258 aesni: Namespace include guard for AES-CMAC
Was the same as in the cmac plugin.
2020-01-28 15:32:43 +01:00
Tobias Brunner
e438915e62 tls-prf: Remove unused/undeclared argument in TLS 1.0/1.1 PRF constructor 2020-01-28 15:32:43 +01:00
Tobias Brunner
ea1f4cd7a9 pki: Avoid naming conflict with global variables for passed arguments 2020-01-28 15:32:43 +01:00
Tobias Brunner
d493dc18d6 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.")
2020-01-28 15:32:43 +01:00
Tobias Brunner
42928551ab starter: Avoid hiding global variable when checking PID file 2020-01-28 15:29:40 +01:00
Tobias Brunner
cab86465bb copyright: Make strings static const
They are not used anywhere else.
2020-01-28 15:29:40 +01:00
Tobias Brunner
90df054f14 plugin-constructors: Remove unused import for sys 2020-01-28 15:29:40 +01:00
Tobias Brunner
c584a6b2dc vici: Remove unused import in Python bindings 2020-01-28 15:29:40 +01:00
Tobias Brunner
df4274171e vici: Remove unnecessary pass statement 2020-01-28 15:29:40 +01:00
Tobias Brunner
7bcbf20b3d 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).
2020-01-28 15:29:40 +01:00
Tobias Brunner
73ee7b6664 swanctl: Add missing header guards for load commands 2020-01-28 15:29:40 +01:00
Tobias Brunner
91c6387e69 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.
2020-01-28 15:29:40 +01:00
Tobias Brunner
8ea13bbc5c 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.
2020-01-27 18:31:09 +01:00
Tobias Brunner
9c6ab71782 lgtm: Add config for a more complete build on lgtm.com 2020-01-27 18:00:49 +01:00
Tobias Brunner
3be430cc13 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.
2020-01-22 15:10:09 +01:00
Tobias Brunner
3bc0c9807a sha3: Fix readLane() macro on big-endian platforms 2020-01-20 11:05:17 +01:00
Tobias Brunner
b0b928dd0a Use Botan 2.13.0 for tests 2020-01-16 08:30:47 +01:00
Tobias Brunner
ce4ed21fcb scepclient: Add missing short options (-i, -T) 2020-01-15 12:02:18 +01:00
Tobias Brunner
dc4058ef16 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.
2020-01-14 16:53:53 +01:00
Tobias Brunner
ecf161e517 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.
2020-01-14 16:53:19 +01:00
Tobias Brunner
6352954807 travis: Run python tests with tox 2020-01-14 15:27:06 +01:00
Tobias Brunner
b723431540 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.
2020-01-14 15:26:52 +01:00
Tobias Brunner
574621d80a vici: Fix several PEP8 issues 2020-01-14 15:26:32 +01:00
Tobias Brunner
d5153c5897 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.
2020-01-14 15:26:29 +01:00
Tobias Brunner
c170bb593b vici: List newer Python versions in setup.py 2020-01-14 10:48:53 +01:00
Tobias Brunner
282c57b131 travis: Bump wolfSSL to 4.3.0 2020-01-13 15:49:57 +01:00
Tobias Brunner
846dde91ae wolfssl: Undef RSA_PSS_SALT_LEN_DEFAULT as wolfSSL 4.3.0 defines it as enum 2020-01-13 15:49:57 +01:00
Tobias Brunner
83c8f887d9 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.
2019-12-19 11:42:12 +01:00
Andreas Steffen
e5f18a46b7 Version bump to 5.8.2 5.8.2 2019-12-17 14:30:41 +01:00