libp11 icon indicating copy to clipboard operation
libp11 copied to clipboard

0.4.12 + master [8384cd3f]: test suite is failing

Open kloczek opened this issue 3 years ago • 9 comments

Looks like test suite is failing with openssl 3.0.5 (with disabled EC like in Fedor).

make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/make  check-TESTS
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: rsa-testpkcs11.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: rsa-testlistkeys.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: rsa-oaep.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: search-all-matching-tokens.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: rsa-testfork.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: pkcs11-uri-without-token.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: rsa-check-privkey.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: rsa-pss-sign.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: rsa-evp-sign.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: case-insensitive.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: ec-copy.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: ec-testfork.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: ec-cert-store.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: ec-check-privkey.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: ec-evp-sign.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: fork-change-slot.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
=========================================
   libp11 0.4.12: tests/test-suite.log
=========================================

# TOTAL: 16
# PASS:  6
# SKIP:  0
# XFAIL: 0
# FAIL:  10
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: rsa-testpkcs11.softhsm
============================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.669037
* Initializing smart card libp11-test...ok
Importing
error: OpenSSL error during RSA private key parsing
Aborting.
FAIL rsa-testpkcs11.softhsm (exit status: 1)

FAIL: rsa-testfork.softhsm
==========================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.669041
* Initializing smart card libp11-test...ok
Importing
error: OpenSSL error during RSA private key parsing
Aborting.
FAIL rsa-testfork.softhsm (exit status: 1)

FAIL: rsa-testlistkeys.softhsm
==============================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.669044
* Initializing smart card libp11-test...ok
Importing
error: OpenSSL error during RSA private key parsing
Aborting.
FAIL rsa-testlistkeys.softhsm (exit status: 1)

FAIL: rsa-evp-sign.softhsm
==========================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.669052
* Initializing smart card libp11-test...ok
Importing
error: OpenSSL error during RSA private key parsing
Aborting.
FAIL rsa-evp-sign.softhsm (exit status: 1)

FAIL: rsa-pss-sign.softhsm
==========================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.669059
* Initializing smart card libp11-test...ok
Importing
error: OpenSSL error during RSA private key parsing
Aborting.
FAIL rsa-pss-sign.softhsm (exit status: 1)

FAIL: rsa-oaep.softhsm
======================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.669074
* Initializing smart card libp11-test...ok
Importing
error: OpenSSL error during RSA private key parsing
Aborting.
FAIL rsa-oaep.softhsm (exit status: 1)

FAIL: case-insensitive.softhsm
==============================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.669067
* Initializing smart card libp11-test...ok
Importing
error: OpenSSL error during RSA private key parsing
Aborting.
FAIL case-insensitive.softhsm (exit status: 1)

FAIL: rsa-check-privkey.softhsm
===============================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.669086
* Initializing smart card... ok
Using slot 0 with a present token (0x1fefbfdb)
error: OpenSSL error during RSA private key parsing
Aborting.
FAIL rsa-check-privkey.softhsm (exit status: 1)

FAIL: pkcs11-uri-without-token.softhsm
======================================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.669091
* Initializing smart card libp11-test...ok
Importing
error: OpenSSL error during RSA private key parsing
Aborting.
FAIL pkcs11-uri-without-token.softhsm (exit status: 1)

FAIL: search-all-matching-tokens.softhsm
========================================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.669105
* Initializing smart card libp11-test-0...ok
Importing objects to token libp11-test-0
error: OpenSSL error during RSA private key parsing
Aborting.
FAIL search-all-matching-tokens.softhsm (exit status: 1)

============================================================================
Testsuite summary for libp11 0.4.12
============================================================================
# TOTAL: 16
# PASS:  6
# SKIP:  0
# XFAIL: 0
# FAIL:  10
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
============================================================================

Please let me know if you need some other details.

kloczek avatar Dec 03 '22 15:12 kloczek

Also seeing this issue on Gentoo, with 0.4.12.

matoro avatar Jul 06 '23 19:07 matoro

This does still affect master btw.

matoro avatar Jul 07 '23 04:07 matoro

I believe this issue is related to a regression in the OpenSC project. You can find more details in the following pull request: https://github.com/OpenSC/OpenSC/pull/2656.

glebfm avatar Jul 17 '23 20:07 glebfm

I believe this issue is related to a regression in the OpenSC project. You can find more details in the following pull request: OpenSC/OpenSC#2656.

Confirming that applying this patch fixes all test failures here, thanks!!

matoro avatar Jul 17 '23 21:07 matoro

Gentle ping .. any update? 🤔

kloczek avatar Feb 07 '24 11:02 kloczek

Just retested 0.4.12 with all commits up to dd0a8c63 and test suite still fails this time some units are failing with SIGSEV

+ cd libp11-0.4.12
+ /usr/bin/make -O -j48 V=1 VERBOSE=1 check
Making check in src
/usr/bin/make  check-local
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src'
cd .libs && ln -s -f pkcs11.so libpkcs11.so
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src'
Making check in doc
make[1]: Nothing to be done for 'check'.
Making check in examples
make[1]: Nothing to be done for 'check'.
Making check in tests
/usr/bin/make  openssl_version fork-test evp-sign fork-change-slot list-tokens rsa-pss-sign rsa-oaep check-privkey store-cert dup-key \
  rsa-testpkcs11.softhsm rsa-testfork.softhsm rsa-testlistkeys.softhsm rsa-testlistkeys_ext.softhsm rsa-evp-sign.softhsm ec-evp-sign.softhsm ec-testfork.softhsm fork-change-slot.softhsm rsa-pss-sign.softhsm rsa-oaep.softhsm case-insensitive.softhsm rsa-check-privkey.softhsm ec-check-privkey.softhsm pkcs11-uri-without-token.softhsm search-all-matching-tokens.softhsm ec-cert-store.softhsm ec-copy.softhsm rsa-cert.der rsa-prvkey.der rsa-pubkey.der ec-cert.der ec-prvkey.der ec-pubkey.der
make[2]: Nothing to be done for 'rsa-testpkcs11.softhsm'.
make[2]: Nothing to be done for 'rsa-testfork.softhsm'.
make[2]: Nothing to be done for 'rsa-testlistkeys.softhsm'.
make[2]: Nothing to be done for 'rsa-testlistkeys_ext.softhsm'.
make[2]: Nothing to be done for 'rsa-evp-sign.softhsm'.
make[2]: Nothing to be done for 'ec-evp-sign.softhsm'.
make[2]: Nothing to be done for 'ec-testfork.softhsm'.
make[2]: Nothing to be done for 'fork-change-slot.softhsm'.
make[2]: Nothing to be done for 'rsa-pss-sign.softhsm'.
make[2]: Nothing to be done for 'rsa-oaep.softhsm'.
make[2]: Nothing to be done for 'case-insensitive.softhsm'.
make[2]: Nothing to be done for 'rsa-check-privkey.softhsm'.
make[2]: Nothing to be done for 'ec-check-privkey.softhsm'.
make[2]: Nothing to be done for 'pkcs11-uri-without-token.softhsm'.
make[2]: Nothing to be done for 'search-all-matching-tokens.softhsm'.
make[2]: Nothing to be done for 'ec-cert-store.softhsm'.
make[2]: Nothing to be done for 'ec-copy.softhsm'.
make[2]: Nothing to be done for 'rsa-cert.der'.
make[2]: Nothing to be done for 'rsa-prvkey.der'.
make[2]: Nothing to be done for 'rsa-pubkey.der'.
make[2]: Nothing to be done for 'ec-cert.der'.
make[2]: Nothing to be done for 'ec-prvkey.der'.
make[2]: Nothing to be done for 'ec-pubkey.der'.
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../src  -I.. -I../src -I..   -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -c -o openssl_version.o openssl_version.c
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../src  -I.. -I../src -I..   -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -c -o rsa-pss-sign.o rsa-pss-sign.c
rsa-pss-sign.c: In function ‘display_openssl_errors’:
rsa-pss-sign.c:49:9: warning: ‘ERR_get_error_line’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   49 |         while ((e = ERR_get_error_line(&file, &line))) {
      |         ^~~~~
In file included from rsa-pss-sign.c:35:
/usr/include/openssl/err.h:423:15: note: declared here
  423 | unsigned long ERR_get_error_line(const char **file, int *line);
      |               ^~~~~~~~~~~~~~~~~~
rsa-pss-sign.c: In function ‘main’:
rsa-pss-sign.c:98:9: warning: ‘ENGINE_add_conf_module’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   98 |         ENGINE_add_conf_module();
      |         ^~~~~~~~~~~~~~~~~~~~~~
In file included from rsa-pss-sign.c:36:
/usr/include/openssl/engine.h:709:28: note: declared here
  709 | OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~
rsa-pss-sign.c:110:9: warning: ‘ENGINE_load_builtin_engines’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  110 |         ENGINE_load_builtin_engines();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:358:28: note: declared here
  358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
rsa-pss-sign.c:111:9: warning: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  111 |         e = ENGINE_by_id("pkcs11");
      |         ^
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
rsa-pss-sign.c:117:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  117 |         if (!ENGINE_ctrl_cmd_string(e, "VERBOSE", NULL, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
rsa-pss-sign.c:122:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  122 |         if (!ENGINE_ctrl_cmd_string(e, "MODULE_PATH", module_path, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
rsa-pss-sign.c:127:9: warning: ‘ENGINE_init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  127 |         if (!ENGINE_init(e)) {
      |         ^~
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
rsa-pss-sign.c:132:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  132 |         if (key_pass && !ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
rsa-pss-sign.c:137:9: warning: ‘ENGINE_load_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  137 |         private_key = ENGINE_load_private_key(e, private_key_name, NULL, NULL);
      |         ^~~~~~~~~~~
/usr/include/openssl/engine.h:638:11: note: declared here
  638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
rsa-pss-sign.c:144:9: warning: ‘ENGINE_load_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  144 |         public_key = ENGINE_load_public_key(e, public_key_name, NULL, NULL);
      |         ^~~~~~~~~~
/usr/include/openssl/engine.h:641:11: note: declared here
  641 | EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~
rsa-pss-sign.c:264:9: warning: ‘ENGINE_finish’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  264 |         ENGINE_finish(e);
      |         ^~~~~~~~~~~~~
/usr/include/openssl/engine.h:628:27: note: declared here
  628 | OSSL_DEPRECATEDIN_3_0 int ENGINE_finish(ENGINE *e);
      |                           ^~~~~~~~~~~~~
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../src  -I.. -I../src -I..   -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -c -o list-tokens.o list-tokens.c
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../src  -I.. -I../src -I..   -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -c -o check-privkey.o check-privkey.c
check-privkey.c: In function ‘display_openssl_errors’:
check-privkey.c:47:9: warning: ‘ERR_get_error_line’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   47 |         while ((e = ERR_get_error_line(&file, &line))) {
      |         ^~~~~
In file included from /usr/include/openssl/engine.h:31,
                 from check-privkey.c:24:
/usr/include/openssl/err.h:423:15: note: declared here
  423 | unsigned long ERR_get_error_line(const char **file, int *line);
      |               ^~~~~~~~~~~~~~~~~~
check-privkey.c: In function ‘main’:
check-privkey.c:87:9: warning: ‘ENGINE_add_conf_module’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   87 |         ENGINE_add_conf_module();
      |         ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:709:28: note: declared here
  709 | OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~
check-privkey.c:99:9: warning: ‘ENGINE_load_builtin_engines’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   99 |         ENGINE_load_builtin_engines();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:358:28: note: declared here
  358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
check-privkey.c:101:9: warning: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  101 |         engine = ENGINE_by_id("pkcs11");
      |         ^~~~~~
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
check-privkey.c:109:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  109 |         if (!ENGINE_ctrl_cmd_string(engine, "VERBOSE", NULL, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
check-privkey.c:114:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  114 |         if (!ENGINE_ctrl_cmd_string(engine, "MODULE_PATH", module, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
check-privkey.c:119:9: warning: ‘ENGINE_init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  119 |         if (!ENGINE_init(engine)) {
      |         ^~
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
check-privkey.c:128:17: warning: ‘ENGINE_ctrl_cmd’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  128 |                 if (!ENGINE_ctrl_cmd(engine, "LOAD_CERT_CTRL", 0, &params, NULL, 1)) {
      |                 ^~
/usr/include/openssl/engine.h:450:27: note: declared here
  450 | OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
      |                           ^~~~~~~~~~~~~~~
check-privkey.c:153:9: warning: ‘ENGINE_load_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  153 |         pkey = ENGINE_load_private_key(engine, privkey, 0, 0);
      |         ^~~~
/usr/include/openssl/engine.h:638:11: note: declared here
  638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
check-privkey.c:162:9: warning: ‘ENGINE_finish’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  162 |         ENGINE_finish(engine);
      |         ^~~~~~~~~~~~~
/usr/include/openssl/engine.h:628:27: note: declared here
  628 | OSSL_DEPRECATEDIN_3_0 int ENGINE_finish(ENGINE *e);
      |                           ^~~~~~~~~~~~~
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../src  -I.. -I../src -I..   -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -c -o evp-sign.o evp-sign.c
evp-sign.c: In function ‘display_openssl_errors’:
evp-sign.c:134:9: warning: ‘ERR_get_error_line’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  134 |         while ((e = ERR_get_error_line(&file, &line))) {
      |         ^~~~~
In file included from evp-sign.c:38:
/usr/include/openssl/err.h:423:15: note: declared here
  423 | unsigned long ERR_get_error_line(const char **file, int *line);
      |               ^~~~~~~~~~~~~~~~~~
evp-sign.c: In function ‘main’:
evp-sign.c:186:9: warning: ‘ENGINE_add_conf_module’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  186 |         ENGINE_add_conf_module();
      |         ^~~~~~~~~~~~~~~~~~~~~~
In file included from evp-sign.c:39:
/usr/include/openssl/engine.h:709:28: note: declared here
  709 | OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~
evp-sign.c:198:9: warning: ‘ENGINE_load_builtin_engines’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  198 |         ENGINE_load_builtin_engines();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:358:28: note: declared here
  358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
evp-sign.c:199:9: warning: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  199 |         e = ENGINE_by_id("pkcs11");
      |         ^
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
evp-sign.c:205:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  205 |         if (!ENGINE_ctrl_cmd_string(e, "VERBOSE", NULL, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
evp-sign.c:210:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  210 |         if (!ENGINE_ctrl_cmd_string(e, "MODULE_PATH", module_path, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
evp-sign.c:215:9: warning: ‘ENGINE_init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  215 |         if (!ENGINE_init(e)) {
      |         ^~
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
evp-sign.c:228:17: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  228 |                 if (key_pass && !ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0)) {
      |                 ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
evp-sign.c:236:9: warning: ‘ENGINE_load_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  236 |         private_key = ENGINE_load_private_key(e, private_key_name,
      |         ^~~~~~~~~~~
/usr/include/openssl/engine.h:638:11: note: declared here
  638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
evp-sign.c:244:9: warning: ‘ENGINE_load_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  244 |         public_key = ENGINE_load_public_key(e, public_key_name,
      |         ^~~~~~~~~~
/usr/include/openssl/engine.h:641:11: note: declared here
  641 | EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~
evp-sign.c:309:9: warning: ‘ENGINE_finish’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  309 |         ENGINE_finish(e);
      |         ^~~~~~~~~~~~~
/usr/include/openssl/engine.h:628:27: note: declared here
  628 | OSSL_DEPRECATEDIN_3_0 int ENGINE_finish(ENGINE *e);
      |                           ^~~~~~~~~~~~~
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../src  -I.. -I../src -I..   -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -c -o rsa-oaep.o rsa-oaep.c
rsa-oaep.c: In function ‘display_openssl_errors’:
rsa-oaep.c:50:9: warning: ‘ERR_get_error_line’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   50 |         while ((e = ERR_get_error_line(&file, &line))) {
      |         ^~~~~
In file included from rsa-oaep.c:35:
/usr/include/openssl/err.h:423:15: note: declared here
  423 | unsigned long ERR_get_error_line(const char **file, int *line);
      |               ^~~~~~~~~~~~~~~~~~
rsa-oaep.c: In function ‘main’:
rsa-oaep.c:98:9: warning: ‘ENGINE_add_conf_module’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   98 |         ENGINE_add_conf_module();
      |         ^~~~~~~~~~~~~~~~~~~~~~
In file included from rsa-oaep.c:36:
/usr/include/openssl/engine.h:709:28: note: declared here
  709 | OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~
rsa-oaep.c:108:9: warning: ‘ENGINE_load_builtin_engines’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  108 |         ENGINE_load_builtin_engines();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:358:28: note: declared here
  358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
rsa-oaep.c:110:9: warning: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  110 |         e = ENGINE_by_id("pkcs11");
      |         ^
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
rsa-oaep.c:116:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  116 |         if (!ENGINE_ctrl_cmd_string(e, "VERBOSE", NULL, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
rsa-oaep.c:121:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  121 |         if (!ENGINE_ctrl_cmd_string(e, "MODULE_PATH", module_path, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
rsa-oaep.c:126:9: warning: ‘ENGINE_init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  126 |         if (!ENGINE_init(e)) {
      |         ^~
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
rsa-oaep.c:131:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  131 |         if (key_pass && !ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
rsa-oaep.c:136:9: warning: ‘ENGINE_load_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  136 |         private_key = ENGINE_load_private_key(e, private_key_name, NULL, NULL);
      |         ^~~~~~~~~~~
/usr/include/openssl/engine.h:638:11: note: declared here
  638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
rsa-oaep.c:143:9: warning: ‘ENGINE_load_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  143 |         public_key = ENGINE_load_public_key(e, public_key_name, NULL, NULL);
      |         ^~~~~~~~~~
/usr/include/openssl/engine.h:641:11: note: declared here
  641 | EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~
rsa-oaep.c:241:9: warning: ‘ENGINE_finish’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  241 |         ENGINE_finish(e);
      |         ^~~~~~~~~~~~~
/usr/include/openssl/engine.h:628:27: note: declared here
  628 | OSSL_DEPRECATEDIN_3_0 int ENGINE_finish(ENGINE *e);
      |                           ^~~~~~~~~~~~~
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../src  -I.. -I../src -I..   -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -c -o fork-change-slot.o fork-change-slot.c
fork-change-slot.c: In function ‘main’:
fork-change-slot.c:203:9: warning: ‘ENGINE_add_conf_module’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  203 |         ENGINE_add_conf_module();
      |         ^~~~~~~~~~~~~~~~~~~~~~
In file included from fork-change-slot.c:59:
/usr/include/openssl/engine.h:709:28: note: declared here
  709 | OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~
fork-change-slot.c:206:5: warning: ‘ENGINE_add_conf_module’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  206 |     ENGINE_add_conf_module();
      |     ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:709:28: note: declared here
  709 | OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~
fork-change-slot.c:216:5: warning: ‘ENGINE_load_builtin_engines’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  216 |     ENGINE_load_builtin_engines();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:358:28: note: declared here
  358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
fork-change-slot.c:219:5: warning: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  219 |     engine = ENGINE_by_id("pkcs11");
      |     ^~~~~~
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
fork-change-slot.c:228:9: warning: ‘ENGINE_ctrl_cmd’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  228 |         ENGINE_ctrl_cmd(engine, "MODULE_PATH", 0, argv[3], NULL, 1);
      |         ^~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:450:27: note: declared here
  450 | OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
      |                           ^~~~~~~~~~~~~~~
fork-change-slot.c:232:5: warning: ‘ENGINE_init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  232 |     if (ENGINE_init(engine)) {
      |     ^~
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
fork-change-slot.c:233:9: warning: ‘ENGINE_load_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  233 |         pkey = ENGINE_load_private_key(engine, argv[1], 0, 0);
      |         ^~~~
/usr/include/openssl/engine.h:638:11: note: declared here
  638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
fork-change-slot.c:239:9: warning: ‘ENGINE_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  239 |         ENGINE_free(engine);
      |         ^~~~~~~~~~~
/usr/include/openssl/engine.h:493:27: note: declared here
  493 | OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e);
      |                           ^~~~~~~~~~~
fork-change-slot.c:308:9: warning: ‘ENGINE_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  308 |         ENGINE_free(engine);
      |         ^~~~~~~~~~~
/usr/include/openssl/engine.h:493:27: note: declared here
  493 | OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e);
      |                           ^~~~~~~~~~~
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../src  -I.. -I../src -I..   -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -c -o fork-test.o fork-test.c
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../src  -I.. -I../src -I..   -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -c -o store-cert.o store-cert.c
store-cert.c: In function ‘display_openssl_errors’:
store-cert.c:46:9: warning: ‘ERR_get_error_line’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   46 |         while ((e = ERR_get_error_line(&file, &line))) {
      |         ^~~~~
In file included from ../src/libp11.h:29,
                 from store-cert.c:21:
/usr/include/openssl/err.h:423:15: note: declared here
  423 | unsigned long ERR_get_error_line(const char **file, int *line);
      |               ^~~~~~~~~~~~~~~~~~
store-cert.c: In function ‘main’:
store-cert.c:181:9: warning: ‘ENGINE_add_conf_module’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  181 |         ENGINE_add_conf_module();
      |         ^~~~~~~~~~~~~~~~~~~~~~
In file included from store-cert.c:23:
/usr/include/openssl/engine.h:709:28: note: declared here
  709 | OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~
store-cert.c:194:9: warning: ‘ENGINE_load_builtin_engines’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  194 |         ENGINE_load_builtin_engines();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:358:28: note: declared here
  358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
store-cert.c:196:9: warning: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  196 |         engine = ENGINE_by_id("pkcs11");
      |         ^~~~~~
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
store-cert.c:204:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  204 |         if (!ENGINE_ctrl_cmd_string(engine, "VERBOSE", NULL, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
store-cert.c:209:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  209 |         if (!ENGINE_ctrl_cmd_string(engine, "MODULE_PATH", module, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
store-cert.c:214:9: warning: ‘ENGINE_init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  214 |         if (!ENGINE_init(engine)) {
      |         ^~
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
store-cert.c:223:17: warning: ‘ENGINE_ctrl_cmd’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  223 |                 if (!ENGINE_ctrl_cmd(
      |                 ^~
/usr/include/openssl/engine.h:450:27: note: declared here
  450 | OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
      |                           ^~~~~~~~~~~~~~~
store-cert.c:267:9: warning: ‘ENGINE_finish’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  267 |         ENGINE_finish(engine);
      |         ^~~~~~~~~~~~~
/usr/include/openssl/engine.h:628:27: note: declared here
  628 | OSSL_DEPRECATEDIN_3_0 int ENGINE_finish(ENGINE *e);
      |                           ^~~~~~~~~~~~~
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../src  -I.. -I../src -I..   -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -c -o dup-key.o dup-key.c
dup-key.c: In function ‘display_openssl_errors’:
dup-key.c:48:9: warning: ‘ERR_get_error_line’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   48 |         while ((e = ERR_get_error_line(&file, &line))) {
      |         ^~~~~
In file included from /usr/include/openssl/engine.h:31,
                 from dup-key.c:26:
/usr/include/openssl/err.h:423:15: note: declared here
  423 | unsigned long ERR_get_error_line(const char **file, int *line);
      |               ^~~~~~~~~~~~~~~~~~
dup-key.c: In function ‘main’:
dup-key.c:81:9: warning: ‘ENGINE_add_conf_module’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   81 |         ENGINE_add_conf_module();
      |         ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:709:28: note: declared here
  709 | OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~
dup-key.c:93:9: warning: ‘ENGINE_load_builtin_engines’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   93 |         ENGINE_load_builtin_engines();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:358:28: note: declared here
  358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
dup-key.c:95:9: warning: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   95 |         engine = ENGINE_by_id("pkcs11");
      |         ^~~~~~
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
dup-key.c:103:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  103 |         if (!ENGINE_ctrl_cmd_string(engine, "VERBOSE", NULL, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
dup-key.c:108:9: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  108 |         if (!ENGINE_ctrl_cmd_string(engine, "MODULE_PATH", module, 0)) {
      |         ^~
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
dup-key.c:113:9: warning: ‘ENGINE_init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  113 |         if (!ENGINE_init(engine)) {
      |         ^~
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
dup-key.c:120:9: warning: ‘ENGINE_load_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  120 |         pkey = ENGINE_load_private_key(engine, privkey, 0, 0);
      |         ^~~~
/usr/include/openssl/engine.h:638:11: note: declared here
  638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
dup-key.c:134:17: warning: ‘EVP_PKEY_get1_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  134 |                 ec = EVP_PKEY_get1_EC_KEY(pkey);
      |                 ^~
In file included from /usr/include/openssl/rand.h:23,
                 from /usr/include/openssl/engine.h:29:
/usr/include/openssl/evp.h:1390:19: note: declared here
 1390 | struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
      |                   ^~~~~~~~~~~~~~~~~~~~
dup-key.c:142:17: warning: ‘EC_KEY_dup’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  142 |                 ec_dup = EC_KEY_dup(ec);
      |                 ^~~~~~
In file included from /usr/include/openssl/engine.h:28:
/usr/include/openssl/ec.h:1019:31: note: declared here
 1019 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_dup(const EC_KEY *src);
      |                               ^~~~~~~~~~
dup-key.c:149:17: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  149 |                 EC_KEY_free(ec);
      |                 ^~~~~~~~~~~
/usr/include/openssl/ec.h:1006:28: note: declared here
 1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
dup-key.c:150:17: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  150 |                 EC_KEY_free(ec_dup);
      |                 ^~~~~~~~~~~
/usr/include/openssl/ec.h:1006:28: note: declared here
 1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
dup-key.c:156:9: warning: ‘ENGINE_load_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  156 |         pkey = ENGINE_load_private_key(engine, privkey, 0, 0);
      |         ^~~~
/usr/include/openssl/engine.h:638:11: note: declared here
  638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
dup-key.c:165:9: warning: ‘ENGINE_finish’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  165 |         ENGINE_finish(engine);
      |         ^~~~~~~~~~~~~
/usr/include/openssl/engine.h:628:27: note: declared here
  628 | OSSL_DEPRECATEDIN_3_0 int ENGINE_finish(ENGINE *e);
      |                           ^~~~~~~~~~~~~
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -no-install -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -o openssl_version openssl_version.o ../src/libp11.la -lcrypto -lpthread
libtool: link: /usr/bin/gcc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,pack-relative-relocs -flto=auto -fuse-linker-plugin -o openssl_version openssl_version.o  ../src/.libs/libp11.so -lcrypto -lpthread -pthread -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src/.libs
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -no-install -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -o list-tokens list-tokens.o ../src/libp11.la -lcrypto -lpthread
libtool: link: /usr/bin/gcc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,pack-relative-relocs -flto=auto -fuse-linker-plugin -o list-tokens list-tokens.o  ../src/.libs/libp11.so -lcrypto -lpthread -pthread -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src/.libs
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -no-install -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -o dup-key dup-key.o ../src/libp11.la -lcrypto -lpthread
libtool: link: /usr/bin/gcc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,pack-relative-relocs -flto=auto -fuse-linker-plugin -o dup-key dup-key.o  ../src/.libs/libp11.so -lcrypto -lpthread -pthread -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src/.libs
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -no-install -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -o rsa-oaep rsa-oaep.o ../src/libp11.la -lcrypto -lpthread
libtool: link: /usr/bin/gcc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,pack-relative-relocs -flto=auto -fuse-linker-plugin -o rsa-oaep rsa-oaep.o  ../src/.libs/libp11.so -lcrypto -lpthread -pthread -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src/.libs
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -no-install -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -o check-privkey check-privkey.o ../src/libp11.la -lcrypto -lpthread
libtool: link: /usr/bin/gcc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,pack-relative-relocs -flto=auto -fuse-linker-plugin -o check-privkey check-privkey.o  ../src/.libs/libp11.so -lcrypto -lpthread -pthread -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src/.libs
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -no-install -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -o rsa-pss-sign rsa-pss-sign.o ../src/libp11.la -lcrypto -lpthread
libtool: link: /usr/bin/gcc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,pack-relative-relocs -flto=auto -fuse-linker-plugin -o rsa-pss-sign rsa-pss-sign.o  ../src/.libs/libp11.so -lcrypto -lpthread -pthread -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src/.libs
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -no-install -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -o fork-change-slot fork-change-slot.o ../src/libp11.la -lcrypto -lpthread
libtool: link: /usr/bin/gcc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,pack-relative-relocs -flto=auto -fuse-linker-plugin -o fork-change-slot fork-change-slot.o  ../src/.libs/libp11.so -lcrypto -lpthread -pthread -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src/.libs
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -no-install -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -o evp-sign evp-sign.o ../src/libp11.la -lcrypto -lpthread
libtool: link: /usr/bin/gcc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,pack-relative-relocs -flto=auto -fuse-linker-plugin -o evp-sign evp-sign.o  ../src/.libs/libp11.so -lcrypto -lpthread -pthread -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src/.libs
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -no-install -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -o fork-test fork-test.o ../src/libp11.la -lcrypto -lpthread
libtool: link: /usr/bin/gcc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,pack-relative-relocs -flto=auto -fuse-linker-plugin -o fork-test fork-test.o  ../src/.libs/libp11.so -lcrypto -lpthread -pthread -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src/.libs
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -no-install -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin -o store-cert store-cert.o ../src/libp11.la -lcrypto -lpthread
libtool: link: /usr/bin/gcc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,pack-relative-relocs -flto=auto -fuse-linker-plugin -o store-cert store-cert.o  ../src/.libs/libp11.so -lcrypto -lpthread -pthread -Wl,-rpath -Wl,/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/src/.libs
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
/usr/bin/make  check-TESTS
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: rsa-pss-sign.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: rsa-testlistkeys.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: rsa-oaep.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: rsa-testpkcs11.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: ec-copy.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: rsa-check-privkey.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: ec-cert-store.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: ec-check-privkey.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: rsa-testfork.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: ec-testfork.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: case-insensitive.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: ec-evp-sign.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: pkcs11-uri-without-token.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: rsa-evp-sign.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: rsa-testlistkeys_ext.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
FAIL: search-all-matching-tokens.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
PASS: fork-change-slot.softhsm
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
=========================================
   libp11 0.4.12: tests/test-suite.log
=========================================

# TOTAL: 17
# PASS:  15
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: pkcs11-uri-without-token.softhsm
======================================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.859699
* Initializing smart card libp11-test...ok
Importing
Finished
***************
Listing objects
***************
Using slot 0 with a present token (0x3461b435)
Public Key Object; RSA 2048 bits
  label:      server-key
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
Certificate Object; type = X.509 cert
  label:      server-key
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Private Key Object; RSA
  label:      server-key
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
Detected system: linux-gnu
Engine "pkcs11" set.
./pkcs11-uri-without-token.softhsm: line 57: 859917 Segmentation fault      (core dumped) openssl pkeyutl -engine pkcs11 -keyform engine -inkey "${PRIVATE_KEY}" -sign -out "${outdir}/signature.bin" -in "${outdir}/in.txt"
Failed to generate signature using PKCS#11 URI pkcs11:object=server-key;type=private;pin-value=1234
FAIL pkcs11-uri-without-token.softhsm (exit status: 1)

FAIL: search-all-matching-tokens.softhsm
========================================

Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.859705
* Initializing smart card libp11-test-0...ok
Importing objects to token libp11-test-0
Finished
Certificate Object; type = X.509 cert
  label:      label-0
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Public Key Object; RSA 2048 bits
  label:      label-0
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
Private Key Object; RSA
  label:      label-0
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
* Initializing smart card libp11-test-1...ok
Importing objects to token libp11-test-1
Finished
Certificate Object; type = X.509 cert
  label:      label-1
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Private Key Object; RSA
  label:      label-1
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
Public Key Object; RSA 2048 bits
  label:      label-1
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
* Initializing smart card libp11-test-2...ok
Importing objects to token libp11-test-2
Finished
Public Key Object; RSA 2048 bits
  label:      label-2
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
Certificate Object; type = X.509 cert
  label:      label-2
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Private Key Object; RSA
  label:      label-2
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
* Initializing smart card libp11-test-3...ok
Importing objects to token libp11-test-3
Finished
Certificate Object; type = X.509 cert
  label:      label-3
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Private Key Object; RSA
  label:      label-3
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
Public Key Object; RSA 2048 bits
  label:      label-3
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
* Initializing smart card libp11-test-4...ok
Importing objects to token libp11-test-4
Finished
Public Key Object; RSA 2048 bits
  label:      label-4
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
Certificate Object; type = X.509 cert
  label:      label-4
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Private Key Object; RSA
  label:      label-4
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
* Initializing smart card libp11-test-5...ok
Importing objects to token libp11-test-5
Finished
Public Key Object; RSA 2048 bits
  label:      label-5
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
Certificate Object; type = X.509 cert
  label:      label-5
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Private Key Object; RSA
  label:      label-5
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
Detected system: linux-gnu
Engine "pkcs11" set.
Multiple matching slots (6); will not try to login
- [1] SoftHSM slot ID 0xd18d4ba: libp11-test-3
- [2] SoftHSM slot ID 0x1d8ec90a: libp11-test-5
- [3] SoftHSM slot ID 0x25b56c81: libp11-test-0
- [4] SoftHSM slot ID 0x57c4b869: libp11-test-1
- [5] SoftHSM slot ID 0x705d8817: libp11-test-2
- [6] SoftHSM slot ID 0x768c21fd: libp11-test-4
The private key was not found at: pkcs11:object=label-3;type=private;pin-value=1234
PKCS11_get_private_key returned NULL
Could not read private key from org.openssl.engine:pkcs11:pkcs11:object=label-3;type=private;pin-value=1234
405E6C6D9F7F0000:error:40000065:pkcs11 engine:ERR_ENG_error:object not found:eng_back.c:935:
405E6C6D9F7F0000:error:13000080:engine routines:ENGINE_load_private_key:failed loading private key:crypto/engine/eng_pkey.c:79:
pkeyutl: Error initializing context
./search-all-matching-tokens.softhsm: line 76: 860109 Segmentation fault      (core dumped) openssl pkeyutl -engine pkcs11 -keyform engine -inkey "${PRIVATE_KEY_WITHOUT_TOKEN}" -sign -out "${outdir}/signature.bin" -in "${outdir}/in.txt"
Engine "pkcs11" set.
./search-all-matching-tokens.softhsm: line 84: 860110 Segmentation fault      (core dumped) openssl pkeyutl -engine pkcs11 -keyform engine -inkey "${PRIVATE_KEY}" -sign -out "${outdir}/signature.bin" -in "${outdir}/in.txt"
Failed to sign file using PKCS#11 URI pkcs11:token=libp11-test-3;object=label-3;type=private;pin-value=1234
FAIL search-all-matching-tokens.softhsm (exit status: 1)

============================================================================
Testsuite summary for libp11 0.4.12
============================================================================
# TOTAL: 17
# PASS:  15
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
============================================================================

kloczek avatar Feb 07 '24 11:02 kloczek

Content of the logs

pkcs11-uri-without-token.softhsm.log
+ outdir=output.863636
+ . ./rsa-common.sh
+++ pwd
++ echo 'Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests'
Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
++ echo 'Source directory: .'
Source directory: .
++ echo 'Output directory: output.863636'
Output directory: output.863636
++ mkdir -p output.863636
++ for i in /usr/lib64/pkcs11 /usr/lib64/softhsm /usr/lib/x86_64-linux-gnu/softhsm /usr/local/lib/softhsm /opt/local/lib/softhsm /usr/lib/softhsm /usr/lib
++ test -f /usr/lib64/pkcs11/libsofthsm2.so
++ MODULE=/usr/lib64/pkcs11/libsofthsm2.so
++ break
++ test -x /usr/bin/pkcs11-tool
+ common_init
+ PIN=1234
+ PUK=1234
+ init_db
+ test -x /usr/bin/softhsm
+ test -x /usr/local/bin/softhsm2-util
+ test -x /opt/local/bin/softhsm2-util
+ test -x /usr/bin/softhsm2-util
+ export SOFTHSM2_CONF=output.863636/softhsm-testpkcs11.config
+ SOFTHSM2_CONF=output.863636/softhsm-testpkcs11.config
+ SOFTHSM_TOOL=/usr/bin/softhsm2-util
+ SLOT='--free '
+ test -z /usr/bin/softhsm2-util
+ test -n output.863636/softhsm-testpkcs11.config
+ rm -rf output.863636/softhsm-testpkcs11.db
+ mkdir -p output.863636/softhsm-testpkcs11.db
+ echo 'objectstore.backend = file'
+ echo 'directories.tokendir = output.863636/softhsm-testpkcs11.db'
+ init_card 1234 1234 libp11-test
+ pin=1234
+ puk=1234
+ dev_label=libp11-test
+ echo -n '* Initializing smart card libp11-test...'
* Initializing smart card libp11-test...+ /usr/bin/softhsm2-util --init-token --free --label libp11-test --so-pin 1234 --pin 1234
+ test 0 = 0
+ echo ok
ok
+ echo Importing
Importing
+ import_objects 01020304 server-key libp11-test
+ id=01020304
+ obj_label=server-key
+ token_label=libp11-test
+ pkcs11-tool -p 1234 --module /usr/lib64/pkcs11/libsofthsm2.so -d 01020304 --token-label libp11-test -a server-key -l -w ./rsa-prvkey.der -y privkey
+ test 0 '!=' 0
+ pkcs11-tool -p 1234 --module /usr/lib64/pkcs11/libsofthsm2.so -d 01020304 --token-label libp11-test -a server-key -l -w ./rsa-pubkey.der -y pubkey
+ test 0 '!=' 0
+ pkcs11-tool -p 1234 --module /usr/lib64/pkcs11/libsofthsm2.so -d 01020304 --token-label libp11-test -a server-key -l -w ./rsa-cert.der -y cert
+ test 0 '!=' 0
+ echo Finished
Finished
+ list_objects
+ echo '***************'
***************
+ echo 'Listing objects'
Listing objects
+ echo '***************'
***************
+ pkcs11-tool -p 1234 --module /usr/lib64/pkcs11/libsofthsm2.so -l -O
Using slot 0 with a present token (0x779bae44)
Private Key Object; RSA
  label:      server-key
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
Certificate Object; type = X.509 cert
  label:      server-key
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Public Key Object; RSA 2048 bits
  label:      server-key
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
+ echo 'Detected system: linux-gnu'
Detected system: linux-gnu
+ case "${OSTYPE}" in
+ SHARED_EXT=.so
+ sed -e 's|@MODULE_PATH@|/usr/lib64/pkcs11/libsofthsm2.so|g' -e 's|@ENGINE_PATH@|../src/.libs/pkcs11.so|g'
+ export OPENSSL_ENGINES=../src/.libs/
+ OPENSSL_ENGINES=../src/.libs/
+ export OPENSSL_CONF=output.863636/engines.cnf
+ OPENSSL_CONF=output.863636/engines.cnf
+ PRIVATE_KEY='pkcs11:object=server-key;type=private;pin-value=1234'
+ PUBLIC_KEY='pkcs11:object=server-key;type=public;pin-value=1234'
+ echo secret
+ openssl pkeyutl -engine pkcs11 -keyform engine -inkey 'pkcs11:object=server-key;type=private;pin-value=1234' -sign -out output.863636/signature.bin -in output.863636/in.txt
Engine "pkcs11" set.
./pkcs11-uri-without-token.softhsm: line 57: 863648 Segmentation fault      (core dumped) openssl pkeyutl -engine pkcs11 -keyform engine -inkey "${PRIVATE_KEY}" -sign -out "${outdir}/signature.bin" -in "${outdir}/in.txt"
+ test 139 '!=' 0
+ echo 'Failed to generate signature using PKCS#11 URI pkcs11:object=server-key;type=private;pin-value=1234'
Failed to generate signature using PKCS#11 URI pkcs11:object=server-key;type=private;pin-value=1234
+ exit 1
FAIL pkcs11-uri-without-token.softhsm (exit status: 1)
search-all-matching-tokens.softhsm.log
Current directory: /home/tkloczko/rpmbuild/BUILD/libp11-0.4.12/tests
Source directory: .
Output directory: output.863653
* Initializing smart card libp11-test-0...ok
Importing objects to token libp11-test-0
Finished
Public Key Object; RSA 2048 bits
  label:      label-0
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
Certificate Object; type = X.509 cert
  label:      label-0
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Private Key Object; RSA
  label:      label-0
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
* Initializing smart card libp11-test-1...ok
Importing objects to token libp11-test-1
Finished
Private Key Object; RSA
  label:      label-1
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
Public Key Object; RSA 2048 bits
  label:      label-1
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
Certificate Object; type = X.509 cert
  label:      label-1
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
* Initializing smart card libp11-test-2...ok
Importing objects to token libp11-test-2
Finished
Certificate Object; type = X.509 cert
  label:      label-2
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Private Key Object; RSA
  label:      label-2
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
Public Key Object; RSA 2048 bits
  label:      label-2
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
* Initializing smart card libp11-test-3...ok
Importing objects to token libp11-test-3
Finished
Certificate Object; type = X.509 cert
  label:      label-3
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Private Key Object; RSA
  label:      label-3
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
Public Key Object; RSA 2048 bits
  label:      label-3
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
* Initializing smart card libp11-test-4...ok
Importing objects to token libp11-test-4
Finished
Private Key Object; RSA
  label:      label-4
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
Certificate Object; type = X.509 cert
  label:      label-4
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Public Key Object; RSA 2048 bits
  label:      label-4
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
* Initializing smart card libp11-test-5...ok
Importing objects to token libp11-test-5
Finished
Public Key Object; RSA 2048 bits
  label:      label-5
  ID:         01020304
  Usage:      encrypt, verify, verifyRecover, wrap
  Access:     none
Private Key Object; RSA
  label:      label-5
  ID:         01020304
  Usage:      decrypt, sign, signRecover, unwrap
  Access:     sensitive
Certificate Object; type = X.509 cert
  label:      label-5
  subject:    DN: CN=server-1
  serial:     5587F1771D95BBCEC82B19F9
  ID:         01020304
Detected system: linux-gnu
Engine "pkcs11" set.
Multiple matching slots (6); will not try to login
- [1] SoftHSM slot ID 0x1a75fe32: libp11-test-4
- [2] SoftHSM slot ID 0x1e368c87: libp11-test-0
- [3] SoftHSM slot ID 0x309278d3: libp11-test-1
- [4] SoftHSM slot ID 0x4c0b3a5d: libp11-test-3
- [5] SoftHSM slot ID 0x5daa60f0: libp11-test-5
- [6] SoftHSM slot ID 0x7db37dd7: libp11-test-2
The private key was not found at: pkcs11:object=label-3;type=private;pin-value=1234
PKCS11_get_private_key returned NULL
Could not read private key from org.openssl.engine:pkcs11:pkcs11:object=label-3;type=private;pin-value=1234
401EC28B537F0000:error:40000065:pkcs11 engine:ERR_ENG_error:object not found:eng_back.c:935:
401EC28B537F0000:error:13000080:engine routines:ENGINE_load_private_key:failed loading private key:crypto/engine/eng_pkey.c:79:
pkeyutl: Error initializing context
./search-all-matching-tokens.softhsm: line 76: 863690 Segmentation fault      (core dumped) openssl pkeyutl -engine pkcs11 -keyform engine -inkey "${PRIVATE_KEY_WITHOUT_TOKEN}" -sign -out "${outdir}/signature.bin" -in "${outdir}/in.txt"
Engine "pkcs11" set.
./search-all-matching-tokens.softhsm: line 84: 863691 Segmentation fault      (core dumped) openssl pkeyutl -engine pkcs11 -keyform engine -inkey "${PRIVATE_KEY}" -sign -out "${outdir}/signature.bin" -in "${outdir}/in.txt"
Failed to sign file using PKCS#11 URI pkcs11:token=libp11-test-3;object=label-3;type=private;pin-value=1234
FAIL search-all-matching-tokens.softhsm (exit status: 1)

It looks like openssl command if core dumping on loading pkcs11 module.

kloczek avatar Feb 07 '24 11:02 kloczek

@kloczek have you been able to reproduce the issue with OpenSC 0.24.0?

glebfm avatar Feb 07 '24 16:02 glebfm

What I've provided was with opensc 0.24.0.

kloczek avatar Feb 08 '24 23:02 kloczek

I think that this issue is specific to certain OpenSSL versions that cause a segmentation fault during private key operations. The fault occurs in engine operations and has been addressed upstream with commit https://github.com/openssl/openssl/commit/39ea783. This was resolved with the workaround in PR https://github.com/OpenSC/libp11/pull/554

@kloczek Could you try again using pkcs11.so built from the latest master branch?

olszomal avatar Nov 14 '24 13:11 olszomal

I believe this issue has been resolved and is no longer present in the latest master branch of https://github.com/OpenSC/libp11. I recommend closing this issue.

olszomal avatar Nov 22 '24 08:11 olszomal