Enable and disable OpenSSL provider tests
v2 cover Enable and disable OpenSSL provider tests
This series enables tests with OpenSSL providers on Ubuntu for testing with pkcs11 and SoftHSM. At the same time it disables testing with OpenSSL providers on AltLinux and Debian due to an issue that most likely stems from a bug in a dependency (OpenSSL, p11-kit-modules, SoftHSM, or others).
Thanks to Jonathan McDowell for the backtrace on Debian. It seemms to be the same problem as on AltLinux - a locking issue in the C_Login -> C_OpenSession callpath that blocks forever in a pthread_mutex_lock().
v2:
- dropped ci/cd changes from 3/4 in favor of 4/4
Regards,
Stefan
Stefan Berger (4):
Call OPENSSL_Cleanup before main exit to avoid crashes when engine was
used
CI/CD: Disable pkcs11 providers for Debian and AltLinux CI/CD: Prepare Ubuntu 24.04 (Noble) to run provider tests Replace Ubuntu mantic with noble
.github/workflows/ci.yml | 5 ++-- .travis.yml | 4 +-- ci/alt.sh | 2 +- ci/debian.sh | 2 +- ci/ubuntu.sh | 63 +++++++++++++++++++++++++++++++++++++++- src/evmctl.c | 3 ++ 6 files changed, 71 insertions(+), 8 deletions(-) mode change 120000 => 100755 ci/ubuntu.sh
Signature · 1 line
2.45.2
PATCH v2 1/4 Call OPENSSL_Cleanup before main exit to avoid crashes when engine was used
From: Stefan Berger <[email protected]>
When OPENSSL_Cleanup is called via destructor after main() was left then evmctl crashes on Ubuntu 24.04 (Noble). This can be avoided by calling OpenSSL_Cleanup explicitly before leaving main().
--- src/evmctl.c | 3 +++ 1 file changed, 3 insertions(+)
src/evmctl.c +3 -0
@@ -3347,5 +3347,8 @@ error:ERR_free_strings ();EVP_cleanup ();BIO_free (NULL ); +#if OPENSSL_VERSION_NUMBER >=0x30000000 +OPENSSL_cleanup (); +#endif return err; }
Signature · 1 line
2.45.2
PATCH v2 2/4 CI/CD: Disable pkcs11 providers for Debian and AltLinux
In reply to Stefan BergerFrom: Stefan Berger <[email protected]>
Disable testing provider support on Debian:latest and AltLinux:sisyphus since both now get stuck while running OpenSSL provider-related tests. This is most likely due to an update in a dependency (OpenSSL, p11-kit-modules, softhsm, or others).
On AltLinux the issues is related to a pthread_mutex_lock() down the C_Login -> C_OpenSession callpath that blocks forever.
--- ci/alt.sh | 2 +- ci/debian.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
ci/alt.sh +1 -1
@@ -28,4 +28,4 @@ apt-get install -y \ xxd \ && control openssl-gost enabled -apt-get install -y pkcs11-provider || true +# apt-get install -y pkcs11-provider || true
ci/debian.sh +1 -1
@@ -59,4 +59,4 @@ $apt \ $apt xxd || $apt vim-common $apt libengine-gost-openssl || true $apt softhsm2 gnutls-bin libengine-pkcs11-openssl || true -$apt softhsm2 gnutls-bin pkcs11-provider || true +# $apt softhsm2 gnutls-bin pkcs11-provider || true
Signature · 1 line
2.45.2
PATCH v2 3/4 CI/CD: Prepare Ubuntu 24.04 (Noble) to run provider tests
In reply to Stefan BergerFrom: Stefan Berger <[email protected]>
With provider support fixed for Ubuntu 24.04 (Noble), prepare for enabling testing with it. To test provider support on Ubuntu, make a copy of the debian.sh install file and enable the installation of provider support there.
--- ci/ubuntu.sh | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) mode change 120000 => 100755 ci/ubuntu.sh
ci/ubuntu.sh deleted +0 -1
@@ -1 +0,0 @@ -debian.sh
ci/ubuntu.sh new file +62 -0
62 lines not on this page · raw message
Signature · 1 line
2.45.2
PATCH v2 4/4 Replace Ubuntu mantic with noble
In reply to Stefan BergerAs Ubuntu noble contains a pkcs11-provider package, use it for testing. Also use the distro provided openssl version.
--- .github/workflows/ci.yml | 5 ++--- .travis.yml | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-)
.github/workflows/ci.yml +2 -3
@@ -132,13 +132,12 @@ jobs: CC: gcc TSS: tpm2-tss - - container: "ubuntu:jammy" + - container: "ubuntu:noble" env: CC: gcc TSS: ibmtss - COMPILE_SSL: openssl-3.0.5 - - container: "ubuntu:mantic" + - container: "ubuntu:jammy" env: CC: gcc TSS: ibmtss
.travis.yml +2 -2
@@ -40,11 +40,11 @@ matrix: compiler: gcc - os: linux - env: DISTRO=ubuntu:mantic TSS=ibmtss + env: DISTRO=ubuntu:noble TSS=ibmtss compiler: gcc - os: linux - env: DISTRO=ubuntu:jammy TSS=ibmtss COMPILE_SSL=openssl-3.0.5 + env: DISTRO=ubuntu:jammy TSS=ibmtss compiler: gcc - os: linux
Signature · 1 line
2.45.2