Commit Graph
326 Commits
Author SHA1 Message Date
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
30faf04e92 ("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
085daf4743 ("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
Tobias Brunner c9d471091f Use mallinfo2() if available
mallinfo() is deprecated because it uses `int` for the members of the
returned struct, whereas mallinfo2() uses `size_t`.  It's available
since glibc 2.33.
2022-04-25 14:16:20 +02:00
Tobias Brunner a5cfa57134 github: Add a build against OpenSSL 3.0 2022-04-14 19:05:45 +02:00
Tobias Brunner 08e31138bd appveyor: Enable kdf plugin on old images with OpenSSL 1.0.2/1.1.0
HKDF with expand-only mode is only available since OpenSSL 1.1.1.
2022-04-14 19:02:56 +02:00
Tobias Brunner fe5f27336d configure: Add option to link against libselinux 2022-04-14 18:42:01 +02:00
Tobias Brunner e69438450f Use wolfSSL 5.2.0 for tests 2022-02-22 09:35:01 +01:00
Tobias Brunner 42704f6a61 tls-test: Add option to specify a specific remote identity 2022-02-15 16:54:39 +01:00
Tobias Brunner 1bb05006d3 Use Botan 2.19.1 for tests 2022-01-24 17:30:33 +01:00
Tobias Brunner cd0c9919d9 Use wolfSSL 5.1.1 for tests
Add --tags when fetching commits so we get tags that are not in any
branches, which is currently the case with this tag.
2022-01-04 15:47:16 +01:00
Andreas Steffen b50e8a88ff gcrypt: Enable RSA PKCS1 encryption/decryption 2021-11-10 20:17:49 +01:00
Tobias Brunner d1278ed926 Use wolfSSL 5.0.0 for tests 2021-11-02 09:41:25 +01:00
Tobias Brunner e19eb070fa Use Botan 2.18.2 for tests 2021-10-29 09:07:38 +02:00
Tobias Brunner b241e944fa cirrus: Use specific package name for OpenLDAP
Seems the openldap-client alias is gone.
2021-10-12 14:55:55 +02:00
Tobias Brunner 3e148e5b76 github: Fix build on macOS due to moved OpenSSL location 2021-09-30 16:24:25 +02:00
Tobias Brunner 2fbbd05ec5 github: Use OpenSSL 1.1 on macOS
The "openssl" alias now defaults to OpenSSL 3.0, which produces a lot of
deprecation warnings.  To avoid build failures due to `-Werror`, stay with
OpenSSL 1.1 until we can get rid of these issues.
2021-09-23 17:02:17 +02:00