340 Commits

Author SHA1 Message Date
Tobias Brunner
6dee8587f0 Remove obvious empty statements (i.e. stray semicolons) 2024-02-29 15:30:40 +01:00
Tobias Brunner
b7fdc10a3c Use Botan 3.3.0 for tests 2024-02-22 13:49:46 +01:00
Tobias Brunner
10a876d54c github: Use new property to pass token for sonarcloud
sonar.login is deprecated.
2024-02-16 14:50:16 +01:00
Tobias Brunner
798e25f313 github: Use newer gperf version on macOS
The gperf version that's already available on the system generates
function declarations with K&R syntax (separate arguments) for which newer
compilers produce a warning as C23 doesn't support that syntax anymore.
2024-01-16 11:00:29 +01:00
Tobias Brunner
eda91911fa Use wolfSSL 5.6.4 for tests 2023-11-03 09:28:51 +01:00
Tobias Brunner
578b561a22 Use Botan 3.2.0 for tests
This includes a change that allows checking EC keys for explicit
param encoding.
2023-10-13 09:10:46 +02:00
Tobias Brunner
36b1a6d76c Use Botan 3.1.1 for tests
The all-zero Ed25519 public key is rejected by botan_pubkey_check_key()
when the key is loaded.

Note that Botan 3 requires GCC 11 or CLANG 14, i.e. can't easily be built
on Debian bullseye or Ubuntu 20.04.

The thread-local storage function gets flagged via various botan FFI
functions when using Botan 3, whitelist that instead of all of them.
2023-07-26 13:09:22 +02:00
Tobias Brunner
4c2747fbfc Use wolfSSL 5.6.3 for tests 2023-06-21 15:31:53 +02:00
Tobias Brunner
43975f33ef Use wolfSSL 5.6.2 for tests
ECC keys can now be smaller so we can't access the private key directly
anymore.
2023-06-13 10:13:29 +02:00
Tobias Brunner
03c08423dd github: Use new cache storage properties for sonarcloud 2023-06-02 11:37:06 +02:00
Tobias Brunner
0e88b8a817 github: Use OpenSSL 3.1.1 for tests 2023-05-31 15:45:02 +02:00
Tobias Brunner
027ba4d12e github: Add build with DBG completely disabled 2023-05-08 17:32:18 +02:00
Tobias Brunner
e288c507b6 Use wolfSSL 5.6.0 for tests
The `--enable-heapmath` configure option has been deprecated.  As
already described in eae30af029b1 ("Use wolfSSL 5.4.0 for tests"), the
alternative is to configure `--with-max-rsa-bits=8192` instead in order
to test the modp6144 and modp8192 DH groups.
2023-03-30 10:32:45 +02:00
Tobias Brunner
8bb772a9fa appveyor: Build eap-radius plugin on Windows 2023-03-21 16:33:03 +01:00
Tobias Brunner
c0fc048775 github: Use OpenSSL 3.1.0 for tests 2023-03-21 16:11:49 +01:00
Tobias Brunner
89936186a8 github: Don't build on Ubuntu 18.04 anymore
The Ubuntu 18.04 image is deprecated and builds will start to fail
temporarily during four 24 hour periods from now until the final
deprecation on April 1st.  So better remove these runs now.
2023-03-07 14:51:10 +01:00
Tobias Brunner
d250620970 appveyor: Fix LDFLAGS for Windows build
With newer OpenSSL builds, the DLL files contain parts of the version
number and the architecture in their name, e.g. for OpenSSL 1.1.1 the
DLL for libcrypto is called libcrypto-1_1-x64.dll.  So referencing that
directly could be kinda tricky.  And by using `-lcrypto` we therefore
didn't link those DLLs but the OpenSSL version installed by msys2.
Since the latter ships OpenSSL 3 since January and the VS 2019 image
was updated recently, our builds broke as we used the headers from
the 1.1.1 installation but then tried to link OpenSSL 3.

Luckily, in the lib/ directory of the OpenSSL installation, there is a
libcrypto.lib file, which is an import library (containing the symbols
and a reference to the DLL).  We can use that to link the right library
via `-lcrypto`.

With the old OpenSSL 1.0.2 build on the VS 2015 image, there is also
such a .lib file but it seems the linker is too old or otherwise incapable
of finding the DLL.  But since the DLL is just called libeay32.dll there,
we use that directly and don't reference the lib/ dir.

Also removed a superfluous AC_MSG_RESULT() if libeay32 isn't found.
2023-03-06 15:07:57 +01:00
Tobias Brunner
2b206eaf6a github: Explicitly install pkg-config in macOS build
Apparently not installed anymore in the latest build image.  If it's
missing, we see errors like these:

  configure.ac:38: error: possibly undefined macro: AC_DEFINE
2023-02-20 14:50:02 +01:00
Tobias Brunner
eac27ce677 android: Use custom-built OpenSSL for GH action 2023-02-13 15:30:58 +01:00
Tobias Brunner
77bd5ab1a8 github: Use OpenSSL 3.0.8 for tests 2023-02-07 18:06:16 +01:00
Tobias Brunner
1a8106ee0d github: Use tpm2-tss 3.2.2 for tests 2023-01-31 17:22:44 +01:00
Tobias Brunner
632834af91 dh-speed: Add wolfssl and BP ECDH to test script 2023-01-06 15:31:03 +01:00
Tobias Brunner
e396dbeca5 dh-speed: Dynamically look up KE method 2023-01-06 15:31:00 +01:00
Tobias Brunner
a59a6d4783 dh-speed: Don't reuse DH object
Since the changes to the DH implementations that were merged with
30faf04e92dc ("Merge branch 'multi-ke-backport'"), most implementations
don't support deriving different shared secrets for the same private key
by calling set_public_key() with another public key anymore (some prevent
it explicitly, but reusing DH private keys is not something we want to
support anyway).  So we can't reuse the DH object on one side for every
round.
2023-01-06 12:13:12 +01:00
Tobias Brunner
cb6516cc0a Use wolfSSL 5.5.4 for tests 2022-12-21 16:41:36 +01:00
Tobias Brunner
2192bfb9ec github: Use tpm2-tss 3.2.1 for tests 2022-12-13 16:32:02 +01:00
Tobias Brunner
03541c73a0 github: Fix Python build with custom OpenSSL version 2022-12-12 16:57:01 +01:00
Tobias Brunner
cb5ae75ac1 github: Remove obsolete LGTM workflow
lgtm.com will be shutdown soon.
2022-12-05 16:49:07 +01:00
Tobias Brunner
0d3fcd100d github: Add CodeQL workflow 2022-12-05 16:49:07 +01:00
Tobias Brunner
0fea6a7f8e github: Adapt to switch to Ubuntu 22.04 for ubuntu-latest
Ubuntu 22.04 ships OpenSSL 3, which requires debug symbols so we can
whitelist leaks because we don't deinitialize the library.  And because
the shipped library is not built with `-fno-omit-frame-pointer`, the
build with AddressSanitizer can't use its fast stack unwind method.
However, the previous workaround for DTLS handling with glibc apparently
isn't necessary anymore.

In the custom OpenSSL build we drop no-stdio as that lets the configure
check for libldns fail because ERR_print_errors_fp@OPENSSL_3.0.0 is not
found.

For ccache, the default path to the cache directory has changed.

Also simplified the NM tests as there is only one build since
085daf474330 ("nm: Remove old libnm-glib compat stuff").
2022-12-02 16:09:04 +01:00
Tobias Brunner
977ab29fc1 Use Botan 2.19.3 for tests 2022-11-28 16:02:25 +01:00
Tobias Brunner
7db77fd32b Use wolfSSL 5.5.3 for tests 2022-11-10 16:15:36 +01:00
Tobias Brunner
652ce18120 github: Use OpenSSL 3.0.7 for tests 2022-11-10 16:15:36 +01:00
Tobias Brunner
f16a12eae5 github: Fix URL to BoringSSL repository for Android build 2022-11-05 14:58:02 +01:00
Tobias Brunner
d42f4367dd cirrus: Don't explicitly install openldap*-client on FreeBSD
This avoids a conflicts as mysql80-client has a dependency on either
openldap24-client (FreeBSD 12) or openldap26-client (FreeBSD 13) so e.g.
installing openldap24-client on FreeBSD 13 causes

  openldap26-client-2.6.3 conflicts with openldap24-client-2.4.59_4 on /usr/local/bin/ldapadd

Similarly, when installing openldap26-client on FreeBSD 12.  So just let
the mysql80-client package decide which version is installed.
2022-10-06 12:26:50 +02:00
Tobias Brunner
7f46c76125 Make functions static that are only accessed from the same compilation unit
Also removed some declarations for undefined functions.
2022-10-05 19:00:46 +02:00
Tobias Brunner
895597817a github: Prefer third-party crypto lib's implementations over ours
If e.g. the hmac plugin is loaded before the third-party crypto lib
plugin, we might not use the latter's HMAC implementation in some
cases (e.g. in the libtls tests).
2022-09-28 17:17:56 +02:00
Tobias Brunner
00fd78305c Use wolfSSL 5.5.1 for tests 2022-09-28 14:55:39 +02:00
Tobias Brunner
d29af802bb github: Enable AddressSanitizer if leak-detective is disabled
At least for the tests where it is available and works.  It conflicts
with the instrumentation used by the coverage and fuzzing (and possibly
sonarcloud) tests, the toolchain for the Windows builds doesn't seem to
support it, and on FreeBSD the test executables hang due to a
compatibility issue with FreeBSD's qsort(), which has been fixed [1],
but that has not made it into the clang version in the base system.

For the custom OpenSSL build, debug symbols are enabled so we can
suppress some leaks properly.

[1] https://github.com/llvm/llvm-project/issues/46176
2022-09-16 15:26:43 +02:00
Tobias Brunner
c4563abc2e github: Use OpenSSL 3.0.5 for tests 2022-09-15 12:16:12 +02:00
Tobias Brunner
73901d2cc3 github: Remove --enable-scepclient from macOS build options 2022-09-06 09:33:00 +02:00
Tobias Brunner
023070b6d0 Use wolfSSL 5.5.0 for tests 2022-09-06 09:33:00 +02:00
Andreas Steffen
77a15f55be libtls: unit tests with crypto libs need additional plugins
In order for libtls to run with the gcrypt libraryi, additionally the
random, pem, gcm, hmac, kdf, x509, constraints, and the curve2519
plugins are needed.

The botan library additionally need the hmac (for HMAC_MD5), x509 and
constraints plugins.

The wolfssl library additionally need the pkcs1, pkcs8, x509 and constraints
plugins.
2022-08-25 10:51:05 +02:00
Tobias Brunner
71b0c031c2 android: Slightly increase NDK version
This version was installed in the base image until Aug 1st (the other we
installed was not actually used for a while).
2022-08-18 09:42:34 +02:00
Tobias Brunner
1f242e772b configure: Add option to build with extended compiler warnings and -Werror
Setting -Werror in CFLAGS passed to configure is not ideal as that affects
all the checks performed by the script.

This caused an issue with newer versions of Autoconf and the AC_PROG_LEX
macro that insisted on finding a lexer library.  But due to warnings from
the generated test lexer (misleading indentation) that got turned into
errors no library was found (none would have been necessary), so LEX was
not set and no lexers were built.

With this option enabled, we add -Werror to CFLAGS after all tests ran.
It also enables additional warnings via -Wextra.

The option is auto-enabled when building from the repository.
2022-07-18 12:42:24 +02:00
Tobias Brunner
1656e3806b configure: Add noyywrap option to AC_PROG_LEX for Autoconf 2.70+
FreeBSD packages 2.71 and that spits out a deprecation warning if we
don't set this.
2022-07-18 12:42:24 +02:00
Tobias Brunner
eae30af029 Use wolfSSL 5.4.0 for tests
The 5.4.0 update changed the default bignum implementation to what
could explicitly be enabled via `--enable-sp-math-all`.  Since this uses
fixed-sized buffers sufficient for key sizes of SP_INT_BITS, with a default
of 4096, modp6144 and modp8192 didn't work anymore (wc_DhGenerateKeyPair()
returned MP_EXPTMOD_E).  So we have to adapt the feature checks for this.

To support the larger DH groups we can either increase the buffer size
via `--with-max-rsa-bits` or add `--enable-heapmath` so buffers get
(re-)allocated as needed.  We go with the latter for now.
2022-07-18 12:42:24 +02:00
Tobias Brunner
3af7c6db87 Rename diffie_hellman_t to key_exchange_t and change the interface etc.
This makes it more generic so we can use it for QSKE methods.
2022-06-29 10:28:50 +02:00
Tobias Brunner
19ef2aec15 Update copyright headers after acquisition by secunet 2022-06-28 10:22:56 +02:00
Tobias Brunner
f62b942d6a Use wolfSSL 5.3.0 for tests 2022-05-06 12:03:48 +02:00