OpenSC / pkcs11-helper

Library that simplifies the interaction with PKCS#11 providers for end-user applications using a simple API and optional OpenSSL engine
Other
66 stars 43 forks source link

1.27.0: build against openssl 3.0.0 fails #42

Closed kloczek closed 2 years ago

kloczek commented 3 years ago

Yeah look like pkcs11-helper is not ready

[tkloczko@barrel pkcs11-helper-pkcs11-helper-1.27]$ make -k
make  all-recursive
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27'
Making all in man
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/man'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/man'
Making all in include
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include'
Making all in pkcs11-helper-1.0
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include/pkcs11-helper-1.0'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include/pkcs11-helper-1.0'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include'
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include'
Making all in lib
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/lib'
make  all-am
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/lib'
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc -DHAVE_CONFIG_H -I. -I..  -I../include -I../include   -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Os  -c -o pkcs11h-openssl.lo pkcs11h-openssl.c
libtool: compile:  /usr/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Os -c pkcs11h-openssl.c  -fPIC -DPIC -o .libs/pkcs11h-openssl.o
pkcs11h-openssl.c: In function ‘__pkcs11h_openssl_rsa_get_pkcs11h_certificate’:
pkcs11h-openssl.c:421:9: warning: ‘RSA_get_ex_data’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  421 |         session = (pkcs11h_openssl_session_t)RSA_get_ex_data (rsa, __openssl_methods.rsa_index);
      |         ^~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:446:29: note: declared here
  446 | OSSL_DEPRECATEDIN_3_0 void *RSA_get_ex_data(const RSA *r, int idx);
      |                             ^~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function ‘__pkcs11h_openssl_rsa_dec’:
pkcs11h-openssl.c:477:22: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
  477 |                 case RSA_SSLV23_PADDING:
      |                      ^~~~~~~~~~~~~~~~~~
      |                      RSA_PKCS1_PADDING
pkcs11h-openssl.c:477:22: note: each undeclared identifier is reported only once for each function it appears in
pkcs11h-openssl.c: In function ‘__pkcs11h_openssl_rsa_enc’:
pkcs11h-openssl.c:586:9: warning: ‘RSA_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  586 |         tlen = (size_t)RSA_size(rsa);
      |         ^~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:204:27: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
      |                           ^~~~~~~~
pkcs11h-openssl.c: In function ‘__pkcs11h_openssl_session_setRSA’:
pkcs11h-openssl.c:648:17: warning: ‘EVP_PKEY_get1_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  648 |                 (rsa = EVP_PKEY_get1_RSA (evp)) == NULL
      |                 ^
In file included from /usr/include/openssl/x509.h:29,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/evp.h:1348:16: note: declared here
 1348 | struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:654:9: warning: ‘RSA_set_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  654 |         RSA_set_method (rsa, __openssl_methods.rsa);
      |         ^~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:302:27: note: declared here
  302 | OSSL_DEPRECATEDIN_3_0 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
      |                           ^~~~~~~~~~~~~~
pkcs11h-openssl.c:655:9: warning: ‘RSA_set_ex_data’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  655 |         RSA_set_ex_data (rsa, __openssl_methods.rsa_index, openssl_session);
      |         ^~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:445:27: note: declared here
  445 | OSSL_DEPRECATEDIN_3_0 int RSA_set_ex_data(RSA *r, int idx, void *arg);
      |                           ^~~~~~~~~~~~~~~
pkcs11h-openssl.c:674:17: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  674 |                 RSA_free (rsa);
      |                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
pkcs11h-openssl.c: In function ‘__pkcs11h_openssl_dsa_get_pkcs11h_certificate’:
pkcs11h-openssl.c:700:9: warning: ‘DSA_get_ex_data’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  700 |         session = (pkcs11h_openssl_session_t)DSA_get_ex_data (dsa, __openssl_methods.dsa_index);
      |         ^~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:146:29: note: declared here
  146 | OSSL_DEPRECATEDIN_3_0 void *DSA_get_ex_data(const DSA *d, int idx);
      |                             ^~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function ‘__pkcs11h_openssl_session_setDSA’:
pkcs11h-openssl.c:835:17: warning: ‘EVP_PKEY_get1_DSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  835 |                 (dsa = EVP_PKEY_get1_DSA (evp)) == NULL
      |                 ^
In file included from /usr/include/openssl/x509.h:29,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/evp.h:1357:16: note: declared here
 1357 | struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:841:9: warning: ‘DSA_set_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  841 |         DSA_set_method (dsa, __openssl_methods.dsa);
      |         ^~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:122:27: note: declared here
  122 | OSSL_DEPRECATEDIN_3_0 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
      |                           ^~~~~~~~~~~~~~
pkcs11h-openssl.c:842:9: warning: ‘DSA_set_ex_data’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  842 |         DSA_set_ex_data (dsa, __openssl_methods.dsa_index, openssl_session);
      |         ^~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:145:27: note: declared here
  145 | OSSL_DEPRECATEDIN_3_0 int DSA_set_ex_data(DSA *d, int idx, void *arg);
      |                           ^~~~~~~~~~~~~~~
pkcs11h-openssl.c:849:17: warning: ‘DSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  849 |                 DSA_free (dsa);
      |                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:127:28: note: declared here
  127 | OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
      |                            ^~~~~~~~
pkcs11h-openssl.c: In function ‘__pkcs11h_openssl_eckey_get_pkcs11h_certificate’:
pkcs11h-openssl.c:875:9: warning: ‘EC_KEY_get_ex_data’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  875 |         session = (pkcs11h_openssl_session_t)EC_KEY_get_ex_data (ec, __openssl_methods.eckey_index);
      |         ^~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1082:29: note: declared here
 1082 | OSSL_DEPRECATEDIN_3_0 void *EC_KEY_get_ex_data(const EC_KEY *key, int idx);
      |                             ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function ‘__pkcs11h_openssl_session_setECDSA’:
pkcs11h-openssl.c:1022:17: warning: ‘EVP_PKEY_get1_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1022 |                 (ec = EVP_PKEY_get1_EC_KEY (evp)) == NULL
      |                 ^
In file included from /usr/include/openssl/x509.h:29,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/evp.h:1374:19: note: declared here
 1374 | struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
      |                   ^~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1028:9: warning: ‘EC_KEY_set_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1028 |         EC_KEY_set_method (ec, __openssl_methods.eckey);
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1281:27: note: declared here
 1281 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth);
      |                           ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1029:9: warning: ‘EC_KEY_set_ex_data’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1029 |         EC_KEY_set_ex_data (ec, __openssl_methods.eckey_index, openssl_session);
      |         ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1081:27: note: declared here
 1081 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg);
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1036:17: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1036 |                 EC_KEY_free (ec);
      |                 ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1001:28: note: declared here
 1001 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
pkcs11h-openssl.c: In function ‘_pkcs11h_openssl_initialize’:
pkcs11h-openssl.c:1062:17: warning: ‘RSA_meth_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1062 |                 RSA_meth_free (__openssl_methods.rsa);
      |                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:474:28: note: declared here
  474 | OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1064:9: warning: ‘RSA_meth_dup’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1064 |         if ((__openssl_methods.rsa = RSA_meth_dup (RSA_get_default_method ())) == NULL) {
      |         ^~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:475:35: note: declared here
  475 | OSSL_DEPRECATEDIN_3_0 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
      |                                   ^~~~~~~~~~~~
pkcs11h-openssl.c:1064:9: warning: ‘RSA_get_default_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1064 |         if ((__openssl_methods.rsa = RSA_meth_dup (RSA_get_default_method ())) == NULL) {
      |         ^~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:299:41: note: declared here
  299 | OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_get_default_method(void);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1067:9: warning: ‘RSA_meth_set1_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1067 |         RSA_meth_set1_name (__openssl_methods.rsa, "pkcs11h");
      |         ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:477:27: note: declared here
  477 | OSSL_DEPRECATEDIN_3_0 int RSA_meth_set1_name(RSA_METHOD *meth,
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1068:9: warning: ‘RSA_meth_set_priv_dec’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1068 |         RSA_meth_set_priv_dec (__openssl_methods.rsa, __pkcs11h_openssl_rsa_dec);
      |         ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:520:5: note: declared here
  520 | int RSA_meth_set_priv_dec(RSA_METHOD *rsa,
      |     ^~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1069:9: warning: ‘RSA_meth_set_priv_enc’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1069 |         RSA_meth_set_priv_enc (__openssl_methods.rsa, __pkcs11h_openssl_rsa_enc);
      |         ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:510:5: note: declared here
  510 | int RSA_meth_set_priv_enc(RSA_METHOD *rsa,
      |     ^~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1070:9: warning: ‘RSA_meth_set_flags’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1070 |         RSA_meth_set_flags (__openssl_methods.rsa, RSA_METHOD_FLAG_NO_CHECK | RSA_FLAG_EXT_PKEY);
      |         ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:480:27: note: declared here
  480 | OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1075:17: warning: passing argument 5 of ‘CRYPTO_get_ex_new_index’ from incompatible pointer type [-Wincompatible-pointer-types]
 1075 |                 __pkcs11h_openssl_ex_data_dup,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *) {aka int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)}
In file included from /usr/include/openssl/buffer.h:21,
                 from /usr/include/openssl/x509.h:28,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/crypto.h:245:51: note: expected ‘int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void **, int,  long int,  void *)’ {aka ‘int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int,  long int,  void *)’} but argument is of type ‘int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *)’ {aka ‘int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)’}
  245 |                                    CRYPTO_EX_dup *dup_func,
      |                                    ~~~~~~~~~~~~~~~^~~~~~~~
pkcs11h-openssl.c:1081:17: warning: ‘DSA_meth_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1081 |                 DSA_meth_free (__openssl_methods.dsa);
      |                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:219:28: note: declared here
  219 | OSSL_DEPRECATEDIN_3_0 void DSA_meth_free(DSA_METHOD *dsam);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1083:9: warning: ‘DSA_meth_dup’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1083 |         __openssl_methods.dsa = DSA_meth_dup (DSA_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:220:35: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam);
      |                                   ^~~~~~~~~~~~
pkcs11h-openssl.c:1083:9: warning: ‘DSA_get_default_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1083 |         __openssl_methods.dsa = DSA_meth_dup (DSA_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:121:41: note: declared here
  121 | OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_default_method(void);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1084:9: warning: ‘DSA_meth_set1_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1084 |         DSA_meth_set1_name (__openssl_methods.dsa, "pkcs11h");
      |         ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:222:27: note: declared here
  222 | OSSL_DEPRECATEDIN_3_0 int DSA_meth_set1_name(DSA_METHOD *dsam,
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1085:9: warning: ‘DSA_meth_set_sign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1085 |         DSA_meth_set_sign (__openssl_methods.dsa, __pkcs11h_openssl_dsa_do_sign);
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:231:27: note: declared here
  231 | OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_sign(DSA_METHOD *dsam,
      |                           ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1090:17: warning: passing argument 5 of ‘CRYPTO_get_ex_new_index’ from incompatible pointer type [-Wincompatible-pointer-types]
 1090 |                 __pkcs11h_openssl_ex_data_dup,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *) {aka int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)}
In file included from /usr/include/openssl/buffer.h:21,
                 from /usr/include/openssl/x509.h:28,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/crypto.h:245:51: note: expected ‘int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void **, int,  long int,  void *)’ {aka ‘int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int,  long int,  void *)’} but argument is of type ‘int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *)’ {aka ‘int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)’}
  245 |                                    CRYPTO_EX_dup *dup_func,
      |                                    ~~~~~~~~~~~~~~~^~~~~~~~
pkcs11h-openssl.c:1096:17: warning: ‘EC_KEY_METHOD_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1096 |                 EC_KEY_METHOD_free(__openssl_methods.eckey);
      |                 ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1460:28: note: declared here
 1460 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_free(EC_KEY_METHOD *meth);
      |                            ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1098:9: warning: ‘EC_KEY_METHOD_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1098 |         __openssl_methods.eckey = EC_KEY_METHOD_new (EC_KEY_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1459:38: note: declared here
 1459 | OSSL_DEPRECATEDIN_3_0 EC_KEY_METHOD *EC_KEY_METHOD_new(const EC_KEY_METHOD *meth);
      |                                      ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1098:9: warning: ‘EC_KEY_get_default_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1098 |         __openssl_methods.eckey = EC_KEY_METHOD_new (EC_KEY_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1278:44: note: declared here
 1278 | OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *EC_KEY_get_default_method(void);
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1111:17: warning: ‘EC_KEY_METHOD_get_sign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1111 |                 EC_KEY_METHOD_get_sign(__openssl_methods.eckey, &sig, NULL, NULL);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1522:28: note: declared here
 1522 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_get_sign
      |                            ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1112:17: warning: ‘EC_KEY_METHOD_set_sign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1112 |                 EC_KEY_METHOD_set_sign(__openssl_methods.eckey, sig, NULL, __pkcs11h_openssl_eckey_do_sign);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1478:28: note: declared here
 1478 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_set_sign
      |                            ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1118:17: warning: passing argument 5 of ‘CRYPTO_get_ex_new_index’ from incompatible pointer type [-Wincompatible-pointer-types]
 1118 |                 __pkcs11h_openssl_ex_data_dup,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *) {aka int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)}
In file included from /usr/include/openssl/buffer.h:21,
                 from /usr/include/openssl/x509.h:28,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/crypto.h:245:51: note: expected ‘int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void **, int,  long int,  void *)’ {aka ‘int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int,  long int,  void *)’} but argument is of type ‘int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *)’ {aka ‘int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)’}
  245 |                                    CRYPTO_EX_dup *dup_func,
      |                                    ~~~~~~~~~~~~~~~^~~~~~~~
pkcs11h-openssl.c: In function ‘_pkcs11h_openssl_terminate’:
pkcs11h-openssl.c:1141:17: warning: ‘RSA_meth_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1141 |                 RSA_meth_free (__openssl_methods.rsa);
      |                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:474:28: note: declared here
  474 | OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1147:17: warning: ‘DSA_meth_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1147 |                 DSA_meth_free (__openssl_methods.dsa);
      |                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:219:28: note: declared here
  219 | OSSL_DEPRECATEDIN_3_0 void DSA_meth_free(DSA_METHOD *dsam);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1153:17: warning: ‘EC_KEY_METHOD_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1153 |                 EC_KEY_METHOD_free(__openssl_methods.eckey);
      |                 ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1460:28: note: declared here
 1460 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_free(EC_KEY_METHOD *meth);
      |                            ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function ‘pkcs11h_openssl_session_getRSA’:
pkcs11h-openssl.c:1395:17: warning: ‘EVP_PKEY_get1_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1395 |                 (rsa = EVP_PKEY_get1_RSA (evp)) == NULL
      |                 ^
In file included from /usr/include/openssl/x509.h:29,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/evp.h:1348:16: note: declared here
 1348 | struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1411:17: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1411 |                 RSA_free (rsa);
      |                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
make[3]: *** [Makefile:617: pkcs11h-openssl.lo] Error 1
make[3]: Target 'all-am' not remade because of errors.
kloczek commented 3 years ago

OK I see that 1936234c 6bea4abb b7e5433b 083a3a62 nad 086d5512 does the job. With thpse patches I was ble to build pkcs11-helper against openssl 3.0.0

Wrote: /home/tkloczko/rpmbuild/SRPMS/pkcs11-helper-1.27.0-6.fc35.src.rpm
Wrote: /home/tkloczko/rpmbuild/RPMS/pkcs11-helper-1.27.0-6.fc35.x86_64.rpm
Wrote: /home/tkloczko/rpmbuild/RPMS/pkcs11-helper-debuginfo-1.27.0-6.fc35.x86_64.rpm
Wrote: /home/tkloczko/rpmbuild/RPMS/pkcs11-helper-debugsource-1.27.0-6.fc35.x86_64.rpm
Wrote: /home/tkloczko/rpmbuild/RPMS/pkcs11-helper-devel-1.27.0-6.fc35.x86_64.rpm
kloczek commented 3 years ago

If may I ask to consider change tahgging convention from curent pkcs11-helper-<version> to just <version>. With https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits it would allow use autogenerated from git tag tar balls as dist tar balls. Issue is that current tagging convention causes that base directory in such tar balls is pkcs11-helper-pkcs11-helper-<version>/ as githun/gitlab automatically uses <repo_name>-<git.tag>/ as base directory inside that tar ball.

kloczek commented 3 years ago

A .. and yet another issue. Cimpile timne warings. Summary stats:

[tkloczko@barrel SPECS]$ rpmbuild -ba --with check --with failing_tests pkcs11-helper.spec --quiet 2>&1 | grep -- -W | sed 's/.*\[//; s/\]//' | sort | uniq -c | sort -nr
     38 -Wdeprecated-declarations
      3 -Wincompatible-pointer-types
      1 -Wduplicate-decl-specifier

and full log of those warnings with autoconf 2.71. warnings as well:

autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4
autoreconf: running: /usr/bin/autoconf --force
configure.ac:406: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:406: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:406: the top level
configure.ac:415: warning: The macro `AC_HEADER_TIME' is obsolete.
configure.ac:415: You should run autoupdate.
./lib/autoconf/headers.m4:743: AC_HEADER_TIME is expanded from...
configure.ac:415: the top level
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:251: installing './compile'
configure.ac:78: installing './config.guess'
configure.ac:78: installing './config.sub'
configure.ac:63: installing './install-sh'
configure.ac:63: installing './missing'
lib/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: Leaving directory '.'
pkcs11h-serialization.c:71:20: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
   71 |         const char const *name;
      |                    ^~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_rsa_get_pkcs11h_certificate':
pkcs11h-openssl.c:421:9: warning: 'RSA_get_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  421 |         session = (pkcs11h_openssl_session_t)RSA_get_ex_data (rsa, __openssl_methods.rsa_index);
      |         ^~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:446:29: note: declared here
  446 | OSSL_DEPRECATEDIN_3_0 void *RSA_get_ex_data(const RSA *r, int idx);
      |                             ^~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_rsa_enc':
pkcs11h-openssl.c:583:9: warning: 'RSA_size' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  583 |         tlen = (size_t)RSA_size(rsa);
      |         ^~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:204:27: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
      |                           ^~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_session_setRSA':
pkcs11h-openssl.c:645:17: warning: 'EVP_PKEY_get1_RSA' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  645 |                 (rsa = EVP_PKEY_get1_RSA (evp)) == NULL
      |                 ^
In file included from /usr/include/openssl/x509.h:29,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/evp.h:1348:16: note: declared here
 1348 | struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:651:9: warning: 'RSA_set_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  651 |         RSA_set_method (rsa, __openssl_methods.rsa);
      |         ^~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:302:27: note: declared here
  302 | OSSL_DEPRECATEDIN_3_0 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
      |                           ^~~~~~~~~~~~~~
pkcs11h-openssl.c:652:9: warning: 'RSA_set_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  652 |         RSA_set_ex_data (rsa, __openssl_methods.rsa_index, openssl_session);
      |         ^~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:445:27: note: declared here
  445 | OSSL_DEPRECATEDIN_3_0 int RSA_set_ex_data(RSA *r, int idx, void *arg);
      |                           ^~~~~~~~~~~~~~~
pkcs11h-openssl.c:671:17: warning: 'RSA_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  671 |                 RSA_free (rsa);
      |                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_dsa_get_pkcs11h_certificate':
pkcs11h-openssl.c:697:9: warning: 'DSA_get_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  697 |         session = (pkcs11h_openssl_session_t)DSA_get_ex_data (dsa, __openssl_methods.dsa_index);
      |         ^~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:146:29: note: declared here
  146 | OSSL_DEPRECATEDIN_3_0 void *DSA_get_ex_data(const DSA *d, int idx);
      |                             ^~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_session_setDSA':
pkcs11h-openssl.c:843:17: warning: 'EVP_PKEY_get1_DSA' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  843 |                 (dsa = EVP_PKEY_get1_DSA (evp)) == NULL
      |                 ^
In file included from /usr/include/openssl/x509.h:29,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/evp.h:1357:16: note: declared here
 1357 | struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:849:9: warning: 'DSA_set_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  849 |         DSA_set_method (dsa, __openssl_methods.dsa);
      |         ^~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:122:27: note: declared here
  122 | OSSL_DEPRECATEDIN_3_0 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
      |                           ^~~~~~~~~~~~~~
pkcs11h-openssl.c:850:9: warning: 'DSA_set_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  850 |         DSA_set_ex_data (dsa, __openssl_methods.dsa_index, openssl_session);
      |         ^~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:145:27: note: declared here
  145 | OSSL_DEPRECATEDIN_3_0 int DSA_set_ex_data(DSA *d, int idx, void *arg);
      |                           ^~~~~~~~~~~~~~~
pkcs11h-openssl.c:857:17: warning: 'DSA_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  857 |                 DSA_free (dsa);
      |                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:127:28: note: declared here
  127 | OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
      |                            ^~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_eckey_get_pkcs11h_certificate':
pkcs11h-openssl.c:883:9: warning: 'EC_KEY_get_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  883 |         session = (pkcs11h_openssl_session_t)EC_KEY_get_ex_data (ec, __openssl_methods.eckey_index);
      |         ^~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1082:29: note: declared here
 1082 | OSSL_DEPRECATEDIN_3_0 void *EC_KEY_get_ex_data(const EC_KEY *key, int idx);
      |                             ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_session_setECDSA':
pkcs11h-openssl.c:1041:17: warning: 'EVP_PKEY_get1_EC_KEY' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1041 |                 (ec = EVP_PKEY_get1_EC_KEY (evp)) == NULL
      |                 ^
In file included from /usr/include/openssl/x509.h:29,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/evp.h:1374:19: note: declared here
 1374 | struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
      |                   ^~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1047:9: warning: 'EC_KEY_set_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1047 |         EC_KEY_set_method (ec, __openssl_methods.eckey);
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1281:27: note: declared here
 1281 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth);
      |                           ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1048:9: warning: 'EC_KEY_set_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1048 |         EC_KEY_set_ex_data (ec, __openssl_methods.eckey_index, openssl_session);
      |         ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1081:27: note: declared here
 1081 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg);
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1055:17: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1055 |                 EC_KEY_free (ec);
      |                 ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1001:28: note: declared here
 1001 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
pkcs11h-openssl.c: In function '_pkcs11h_openssl_initialize':
pkcs11h-openssl.c:1081:17: warning: 'RSA_meth_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1081 |                 RSA_meth_free (__openssl_methods.rsa);
      |                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:474:28: note: declared here
  474 | OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1083:9: warning: 'RSA_meth_dup' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1083 |         if ((__openssl_methods.rsa = RSA_meth_dup (RSA_get_default_method ())) == NULL) {
      |         ^~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:475:35: note: declared here
  475 | OSSL_DEPRECATEDIN_3_0 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
      |                                   ^~~~~~~~~~~~
pkcs11h-openssl.c:1083:9: warning: 'RSA_get_default_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1083 |         if ((__openssl_methods.rsa = RSA_meth_dup (RSA_get_default_method ())) == NULL) {
      |         ^~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:299:41: note: declared here
  299 | OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_get_default_method(void);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1086:9: warning: 'RSA_meth_set1_name' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1086 |         RSA_meth_set1_name (__openssl_methods.rsa, "pkcs11h");
      |         ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:477:27: note: declared here
  477 | OSSL_DEPRECATEDIN_3_0 int RSA_meth_set1_name(RSA_METHOD *meth,
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1087:9: warning: 'RSA_meth_set_priv_dec' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1087 |         RSA_meth_set_priv_dec (__openssl_methods.rsa, __pkcs11h_openssl_rsa_dec);
      |         ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:520:5: note: declared here
  520 | int RSA_meth_set_priv_dec(RSA_METHOD *rsa,
      |     ^~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1088:9: warning: 'RSA_meth_set_priv_enc' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1088 |         RSA_meth_set_priv_enc (__openssl_methods.rsa, __pkcs11h_openssl_rsa_enc);
      |         ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:510:5: note: declared here
  510 | int RSA_meth_set_priv_enc(RSA_METHOD *rsa,
      |     ^~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1089:9: warning: 'RSA_meth_set_flags' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1089 |         RSA_meth_set_flags (__openssl_methods.rsa, RSA_METHOD_FLAG_NO_CHECK | RSA_FLAG_EXT_PKEY);
      |         ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:480:27: note: declared here
  480 | OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1094:17: warning: passing argument 5 of 'CRYPTO_get_ex_new_index' from incompatible pointer type [-Wincompatible-pointer-types]
 1094 |                 __pkcs11h_openssl_ex_data_dup,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *) {aka int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)}
In file included from /usr/include/openssl/buffer.h:21,
                 from /usr/include/openssl/x509.h:28,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/crypto.h:245:51: note: expected 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void **, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int,  long int,  void *)'} but argument is of type 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)'}
  245 |                                    CRYPTO_EX_dup *dup_func,
      |                                    ~~~~~~~~~~~~~~~^~~~~~~~
pkcs11h-openssl.c:1100:17: warning: 'DSA_meth_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1100 |                 DSA_meth_free (__openssl_methods.dsa);
      |                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:219:28: note: declared here
  219 | OSSL_DEPRECATEDIN_3_0 void DSA_meth_free(DSA_METHOD *dsam);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1102:9: warning: 'DSA_meth_dup' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1102 |         __openssl_methods.dsa = DSA_meth_dup (DSA_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:220:35: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam);
      |                                   ^~~~~~~~~~~~
pkcs11h-openssl.c:1102:9: warning: 'DSA_get_default_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1102 |         __openssl_methods.dsa = DSA_meth_dup (DSA_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:121:41: note: declared here
  121 | OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_default_method(void);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1103:9: warning: 'DSA_meth_set1_name' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1103 |         DSA_meth_set1_name (__openssl_methods.dsa, "pkcs11h");
      |         ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:222:27: note: declared here
  222 | OSSL_DEPRECATEDIN_3_0 int DSA_meth_set1_name(DSA_METHOD *dsam,
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1104:9: warning: 'DSA_meth_set_sign' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1104 |         DSA_meth_set_sign (__openssl_methods.dsa, __pkcs11h_openssl_dsa_do_sign);
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:231:27: note: declared here
  231 | OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_sign(DSA_METHOD *dsam,
      |                           ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1109:17: warning: passing argument 5 of 'CRYPTO_get_ex_new_index' from incompatible pointer type [-Wincompatible-pointer-types]
 1109 |                 __pkcs11h_openssl_ex_data_dup,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *) {aka int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)}
In file included from /usr/include/openssl/buffer.h:21,
                 from /usr/include/openssl/x509.h:28,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/crypto.h:245:51: note: expected 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void **, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int,  long int,  void *)'} but argument is of type 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)'}
  245 |                                    CRYPTO_EX_dup *dup_func,
      |                                    ~~~~~~~~~~~~~~~^~~~~~~~
pkcs11h-openssl.c:1115:17: warning: 'EC_KEY_METHOD_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1115 |                 EC_KEY_METHOD_free(__openssl_methods.eckey);
      |                 ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1460:28: note: declared here
 1460 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_free(EC_KEY_METHOD *meth);
      |                            ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1117:9: warning: 'EC_KEY_METHOD_new' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1117 |         __openssl_methods.eckey = EC_KEY_METHOD_new (EC_KEY_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1459:38: note: declared here
 1459 | OSSL_DEPRECATEDIN_3_0 EC_KEY_METHOD *EC_KEY_METHOD_new(const EC_KEY_METHOD *meth);
      |                                      ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1117:9: warning: 'EC_KEY_get_default_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1117 |         __openssl_methods.eckey = EC_KEY_METHOD_new (EC_KEY_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1278:44: note: declared here
 1278 | OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *EC_KEY_get_default_method(void);
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1130:17: warning: 'EC_KEY_METHOD_get_sign' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1130 |                 EC_KEY_METHOD_get_sign(__openssl_methods.eckey, &sig, NULL, NULL);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1522:28: note: declared here
 1522 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_get_sign
      |                            ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1131:17: warning: 'EC_KEY_METHOD_set_sign' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1131 |                 EC_KEY_METHOD_set_sign(__openssl_methods.eckey, sig, NULL, __pkcs11h_openssl_eckey_do_sign);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1478:28: note: declared here
 1478 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_set_sign
      |                            ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1137:17: warning: passing argument 5 of 'CRYPTO_get_ex_new_index' from incompatible pointer type [-Wincompatible-pointer-types]
 1137 |                 __pkcs11h_openssl_ex_data_dup,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *) {aka int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)}
In file included from /usr/include/openssl/buffer.h:21,
                 from /usr/include/openssl/x509.h:28,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/crypto.h:245:51: note: expected 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void **, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int,  long int,  void *)'} but argument is of type 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)'}
  245 |                                    CRYPTO_EX_dup *dup_func,
      |                                    ~~~~~~~~~~~~~~~^~~~~~~~
pkcs11h-openssl.c: In function '_pkcs11h_openssl_terminate':
pkcs11h-openssl.c:1160:17: warning: 'RSA_meth_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1160 |                 RSA_meth_free (__openssl_methods.rsa);
      |                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:474:28: note: declared here
  474 | OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1166:17: warning: 'DSA_meth_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1166 |                 DSA_meth_free (__openssl_methods.dsa);
      |                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:37,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/dsa.h:219:28: note: declared here
  219 | OSSL_DEPRECATEDIN_3_0 void DSA_meth_free(DSA_METHOD *dsam);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1172:17: warning: 'EC_KEY_METHOD_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1172 |                 EC_KEY_METHOD_free(__openssl_methods.eckey);
      |                 ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/ec.h:1460:28: note: declared here
 1460 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_free(EC_KEY_METHOD *meth);
      |                            ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function 'pkcs11h_openssl_session_getRSA':
pkcs11h-openssl.c:1414:17: warning: 'EVP_PKEY_get1_RSA' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1414 |                 (rsa = EVP_PKEY_get1_RSA (evp)) == NULL
      |                 ^
In file included from /usr/include/openssl/x509.h:29,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/evp.h:1348:16: note: declared here
 1348 | struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1430:17: warning: 'RSA_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1430 |                 RSA_free (rsa);
      |                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
kloczek commented 3 years ago

Fixing autoconf warnings would be easier after execute autoreconf. Quick proposal of the configure.ac fiels:

--- a//configure.ac~    2020-11-17 18:48:17.000000000 +0000
+++ b//configure.ac     2021-09-16 01:39:29.829315806 +0100
@@ -48,7 +48,7 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #

-AC_PREREQ(2.60)
+AC_PREREQ([2.69])

 define([PACKAGE_VERSION_MAJOR], [1])
 define([PACKAGE_VERSION_MINOR], [27])
@@ -87,7 +87,7 @@
 test -z "${WIN32}" && WIN32="no"
 test -z "${CYGWIN}" && CYGWIN="no"
 case "${host}" in
-       *-mingw*|*-winnt*)
+       *-mingw*|*-winnt*)
                WIN32="yes"
                WIN_LIBPREFIX="lib"
        ;;
@@ -254,19 +254,8 @@
 AC_ARG_VAR([M4], [m4 utility])
 AC_CHECK_PROGS([M4], [m4])

-ifdef(
-       [LT_INIT],
-       [
-               LT_INIT([win32-dll])
-               LT_LANG([Windows Resource])
-       ],
-       [
-               AC_LIBTOOL_WIN32_DLL
-               AC_LIBTOOL_RC
-               AC_PROG_LIBTOOL
-       ]
-)
-
+LT_INIT([win32-dll]
+LT_LANG([Windows Resource]

 if test "${enable_doc}" = "yes"; then
        AC_ARG_VAR([DOXYGEN], [doxygen utility])
@@ -403,7 +392,8 @@
 fi

 # Checks for header files.
-AC_HEADER_STDC
+AC_CHECK_INCLUDES_DEFAULT
+
 AX_CPP_VARARG_MACRO_ISO
 AX_CPP_VARARG_MACRO_GCC
 AC_C_CONST
@@ -412,7 +402,13 @@
 AC_TYPE_OFF_T
 AC_TYPE_PID_T
 AC_TYPE_SIZE_T
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+       AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
+               and <time.h>.  This macro is obsolete.])
+fi
+
 AC_STRUCT_TM
 AX_SIZE_T_PRINTF
 AC_CHECK_HEADERS([ \

With bumping AC_PREREQ() to 2.69 it is possible to use LT_INIT without checking its availabiliy. autoconf 2.69 already is +9 years old and IMO supporting anuyhing older does not make to much sense.

Please let me know if you want that patch as PR.

kloczek commented 3 years ago

No that patch is not fully working. Will check it later.

kloczek commented 3 years ago

Here is corrected patch (where missing two brackets):

--- a/configure.ac~     2020-11-17 18:48:17.000000000 +0000
+++ b/configure.ac      2021-09-16 01:46:17.903677229 +0100
@@ -48,7 +48,7 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #

-AC_PREREQ(2.60)
+AC_PREREQ([2.69])

 define([PACKAGE_VERSION_MAJOR], [1])
 define([PACKAGE_VERSION_MINOR], [27])
@@ -87,7 +87,7 @@
 test -z "${WIN32}" && WIN32="no"
 test -z "${CYGWIN}" && CYGWIN="no"
 case "${host}" in
-       *-mingw*|*-winnt*)
+       *-mingw*|*-winnt*)
                WIN32="yes"
                WIN_LIBPREFIX="lib"
        ;;
@@ -254,19 +254,8 @@
 AC_ARG_VAR([M4], [m4 utility])
 AC_CHECK_PROGS([M4], [m4])

-ifdef(
-       [LT_INIT],
-       [
-               LT_INIT([win32-dll])
-               LT_LANG([Windows Resource])
-       ],
-       [
-               AC_LIBTOOL_WIN32_DLL
-               AC_LIBTOOL_RC
-               AC_PROG_LIBTOOL
-       ]
-)
-
+LT_INIT([win32-dll])
+LT_LANG([Windows Resource])

 if test "${enable_doc}" = "yes"; then
        AC_ARG_VAR([DOXYGEN], [doxygen utility])
@@ -403,7 +392,8 @@
 fi

 # Checks for header files.
-AC_HEADER_STDC
+AC_CHECK_INCLUDES_DEFAULT
+
 AX_CPP_VARARG_MACRO_ISO
 AX_CPP_VARARG_MACRO_GCC
 AC_C_CONST
@@ -412,7 +402,13 @@
 AC_TYPE_OFF_T
 AC_TYPE_PID_T
 AC_TYPE_SIZE_T
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+       AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
+               and <time.h>.  This macro is obsolete.])
+fi
+
 AC_STRUCT_TM
 AX_SIZE_T_PRINTF
 AC_CHECK_HEADERS([ \

[tkloczko@barrel SOURCES]$ ^C
[tkloczko@barrel SOURCES]$
[tkloczko@barrel SOURCES]$ less pkcs11-helper-ac_2.71.patch

[tkloczko@barrel SOURCES]$ cat pkcs11-helper-ac_2.71.patch
--- a/configure.ac~     2020-11-17 18:48:17.000000000 +0000
+++ b/configure.ac      2021-09-16 01:46:17.903677229 +0100
@@ -48,7 +48,7 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #

-AC_PREREQ(2.60)
+AC_PREREQ([2.69])

 define([PACKAGE_VERSION_MAJOR], [1])
 define([PACKAGE_VERSION_MINOR], [27])
@@ -87,7 +87,7 @@
 test -z "${WIN32}" && WIN32="no"
 test -z "${CYGWIN}" && CYGWIN="no"
 case "${host}" in
-       *-mingw*|*-winnt*)
+       *-mingw*|*-winnt*)
                WIN32="yes"
                WIN_LIBPREFIX="lib"
        ;;
@@ -254,19 +254,8 @@
 AC_ARG_VAR([M4], [m4 utility])
 AC_CHECK_PROGS([M4], [m4])

-ifdef(
-       [LT_INIT],
-       [
-               LT_INIT([win32-dll])
-               LT_LANG([Windows Resource])
-       ],
-       [
-               AC_LIBTOOL_WIN32_DLL
-               AC_LIBTOOL_RC
-               AC_PROG_LIBTOOL
-       ]
-)
-
+LT_INIT([win32-dll])
+LT_LANG([Windows Resource])

 if test "${enable_doc}" = "yes"; then
        AC_ARG_VAR([DOXYGEN], [doxygen utility])
@@ -403,7 +392,8 @@
 fi

 # Checks for header files.
-AC_HEADER_STDC
+AC_CHECK_INCLUDES_DEFAULT
+
 AX_CPP_VARARG_MACRO_ISO
 AX_CPP_VARARG_MACRO_GCC
 AC_C_CONST
@@ -412,7 +402,13 @@
 AC_TYPE_OFF_T
 AC_TYPE_PID_T
 AC_TYPE_SIZE_T
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+       AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
+               and <time.h>.  This macro is obsolete.])
+fi
+
 AC_STRUCT_TM
 AX_SIZE_T_PRINTF
 AC_CHECK_HEADERS([ \

With that patch autoreconf shows:

+ autoreconf -fiv
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:251: installing './compile'
configure.ac:78: installing './config.guess'
configure.ac:78: installing './config.sub'
configure.ac:63: installing './install-sh'
configure.ac:63: installing './missing'
lib/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: Leaving directory '.'
alonbl commented 3 years ago

Hi, Can you please create a pull request? Please keep in mind that older autoconf/libtool should be supported in parallel. Thanks,

kloczek commented 3 years ago

Done https://github.com/OpenSC/pkcs11-helper/pull/46

Conan-Kudo commented 3 years ago

There's still the issue of OpenSSL 3.0 removing SSLv2 support entirely (https://github.com/openssl/openssl/pull/14248):

pkcs11h-openssl.c: In function ‘__pkcs11h_openssl_rsa_dec’:
pkcs11h-openssl.c:477:22: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
  477 |                 case RSA_SSLV23_PADDING:
      |                      ^~~~~~~~~~~~~~~~~~
      |                      RSA_PKCS1_PADDING
pkcs11h-openssl.c:477:22: note: each undeclared identifier is reported only once for each function it appears in
Conan-Kudo commented 3 years ago

Oh, looks like that was fixed in https://github.com/OpenSC/pkcs11-helper/commit/086d551251cebb67cd74ab2e735427969bbf215f

kloczek commented 3 years ago

Looks like that patch works. I jaust been able to build pkcs11-helper against openssl 3.0.0

If may I ask maintainer to consider change tagging convention from current pkcs11-helper-<version> to just <version> and match tags version with what is in configure.ac (last version in confifure.ac is 1.27.0 and tag is pkcs11-helper-1.27

kloczek commented 2 years ago

Just tested 1.29.0 and looks like build still fails

[tkloczko@devel-g2v pkcs11-helper-pkcs11-helper-1.27]$ make
make  all-recursive
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27'
Making all in man
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/man'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/man'
Making all in include
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include'
Making all in pkcs11-helper-1.0
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include/pkcs11-helper-1.0'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include/pkcs11-helper-1.0'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include'
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/include'
Making all in lib
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/lib'
make  all-am
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/lib'
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc -DHAVE_CONFIG_H -I. -I..  -I../include -I../include   -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Os  -c -o pkcs11h-openssl.lo pkcs11h-openssl.c
libtool: compile:  /usr/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Os -c pkcs11h-openssl.c  -fPIC -DPIC -o .libs/pkcs11h-openssl.o
pkcs11h-openssl.c: In function '__pkcs11h_openssl_rsa_get_pkcs11h_certificate':
pkcs11h-openssl.c:421:9: warning: 'RSA_get_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  421 |         session = (pkcs11h_openssl_session_t)RSA_get_ex_data (rsa, __openssl_methods.rsa_index);
      |         ^~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from ../include/pkcs11-helper-1.0/pkcs11h-openssl.h:69,
                 from pkcs11h-openssl.c:55:
/usr/include/openssl/rsa.h:446:29: note: declared here
  446 | OSSL_DEPRECATEDIN_3_0 void *RSA_get_ex_data(const RSA *r, int idx);
      |                             ^~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_rsa_dec':
pkcs11h-openssl.c:477:22: error: 'RSA_SSLV23_PADDING' undeclared (first use in this function); did you mean 'RSA_PKCS1_PADDING'?
  477 |                 case RSA_SSLV23_PADDING:
      |                      ^~~~~~~~~~~~~~~~~~
      |                      RSA_PKCS1_PADDING
pkcs11h-openssl.c:477:22: note: each undeclared identifier is reported only once for each function it appears in
pkcs11h-openssl.c: In function '__pkcs11h_openssl_rsa_enc':
pkcs11h-openssl.c:586:9: warning: 'RSA_size' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  586 |         tlen = (size_t)RSA_size(rsa);
      |         ^~~~
/usr/include/openssl/rsa.h:204:27: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
      |                           ^~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_session_setRSA':
pkcs11h-openssl.c:648:17: warning: 'EVP_PKEY_get1_RSA' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  648 |                 (rsa = EVP_PKEY_get1_RSA (evp)) == NULL
      |                 ^
In file included from /usr/include/openssl/x509.h:29:
/usr/include/openssl/evp.h:1348:16: note: declared here
 1348 | struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:654:9: warning: 'RSA_set_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  654 |         RSA_set_method (rsa, __openssl_methods.rsa);
      |         ^~~~~~~~~~~~~~
/usr/include/openssl/rsa.h:302:27: note: declared here
  302 | OSSL_DEPRECATEDIN_3_0 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
      |                           ^~~~~~~~~~~~~~
pkcs11h-openssl.c:655:9: warning: 'RSA_set_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  655 |         RSA_set_ex_data (rsa, __openssl_methods.rsa_index, openssl_session);
      |         ^~~~~~~~~~~~~~~
/usr/include/openssl/rsa.h:445:27: note: declared here
  445 | OSSL_DEPRECATEDIN_3_0 int RSA_set_ex_data(RSA *r, int idx, void *arg);
      |                           ^~~~~~~~~~~~~~~
pkcs11h-openssl.c:674:17: warning: 'RSA_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  674 |                 RSA_free (rsa);
      |                 ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_dsa_get_pkcs11h_certificate':
pkcs11h-openssl.c:700:9: warning: 'DSA_get_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  700 |         session = (pkcs11h_openssl_session_t)DSA_get_ex_data (dsa, __openssl_methods.dsa_index);
      |         ^~~~~~~
In file included from /usr/include/openssl/x509.h:37:
/usr/include/openssl/dsa.h:146:29: note: declared here
  146 | OSSL_DEPRECATEDIN_3_0 void *DSA_get_ex_data(const DSA *d, int idx);
      |                             ^~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_session_setDSA':
pkcs11h-openssl.c:835:17: warning: 'EVP_PKEY_get1_DSA' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  835 |                 (dsa = EVP_PKEY_get1_DSA (evp)) == NULL
      |                 ^
/usr/include/openssl/evp.h:1357:16: note: declared here
 1357 | struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:841:9: warning: 'DSA_set_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  841 |         DSA_set_method (dsa, __openssl_methods.dsa);
      |         ^~~~~~~~~~~~~~
/usr/include/openssl/dsa.h:122:27: note: declared here
  122 | OSSL_DEPRECATEDIN_3_0 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
      |                           ^~~~~~~~~~~~~~
pkcs11h-openssl.c:842:9: warning: 'DSA_set_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  842 |         DSA_set_ex_data (dsa, __openssl_methods.dsa_index, openssl_session);
      |         ^~~~~~~~~~~~~~~
/usr/include/openssl/dsa.h:145:27: note: declared here
  145 | OSSL_DEPRECATEDIN_3_0 int DSA_set_ex_data(DSA *d, int idx, void *arg);
      |                           ^~~~~~~~~~~~~~~
pkcs11h-openssl.c:849:17: warning: 'DSA_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  849 |                 DSA_free (dsa);
      |                 ^~~~~~~~
/usr/include/openssl/dsa.h:127:28: note: declared here
  127 | OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
      |                            ^~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_eckey_get_pkcs11h_certificate':
pkcs11h-openssl.c:875:9: warning: 'EC_KEY_get_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  875 |         session = (pkcs11h_openssl_session_t)EC_KEY_get_ex_data (ec, __openssl_methods.eckey_index);
      |         ^~~~~~~
In file included from /usr/include/openssl/x509.h:33:
/usr/include/openssl/ec.h:1084:29: note: declared here
 1084 | OSSL_DEPRECATEDIN_3_0 void *EC_KEY_get_ex_data(const EC_KEY *key, int idx);
      |                             ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function '__pkcs11h_openssl_session_setECDSA':
pkcs11h-openssl.c:1022:17: warning: 'EVP_PKEY_get1_EC_KEY' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1022 |                 (ec = EVP_PKEY_get1_EC_KEY (evp)) == NULL
      |                 ^
/usr/include/openssl/evp.h:1374:19: note: declared here
 1374 | struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
      |                   ^~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1028:9: warning: 'EC_KEY_set_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1028 |         EC_KEY_set_method (ec, __openssl_methods.eckey);
      |         ^~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1283:27: note: declared here
 1283 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth);
      |                           ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1029:9: warning: 'EC_KEY_set_ex_data' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1029 |         EC_KEY_set_ex_data (ec, __openssl_methods.eckey_index, openssl_session);
      |         ^~~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1083:27: note: declared here
 1083 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg);
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1036:17: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1036 |                 EC_KEY_free (ec);
      |                 ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
pkcs11h-openssl.c: In function '_pkcs11h_openssl_initialize':
pkcs11h-openssl.c:1062:17: warning: 'RSA_meth_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1062 |                 RSA_meth_free (__openssl_methods.rsa);
      |                 ^~~~~~~~~~~~~
/usr/include/openssl/rsa.h:474:28: note: declared here
  474 | OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1064:9: warning: 'RSA_meth_dup' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1064 |         if ((__openssl_methods.rsa = RSA_meth_dup (RSA_get_default_method ())) == NULL) {
      |         ^~
/usr/include/openssl/rsa.h:475:35: note: declared here
  475 | OSSL_DEPRECATEDIN_3_0 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
      |                                   ^~~~~~~~~~~~
pkcs11h-openssl.c:1064:9: warning: 'RSA_get_default_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1064 |         if ((__openssl_methods.rsa = RSA_meth_dup (RSA_get_default_method ())) == NULL) {
      |         ^~
/usr/include/openssl/rsa.h:299:41: note: declared here
  299 | OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_get_default_method(void);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1067:9: warning: 'RSA_meth_set1_name' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1067 |         RSA_meth_set1_name (__openssl_methods.rsa, "pkcs11h");
      |         ^~~~~~~~~~~~~~~~~~
/usr/include/openssl/rsa.h:477:27: note: declared here
  477 | OSSL_DEPRECATEDIN_3_0 int RSA_meth_set1_name(RSA_METHOD *meth,
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1068:9: warning: 'RSA_meth_set_priv_dec' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1068 |         RSA_meth_set_priv_dec (__openssl_methods.rsa, __pkcs11h_openssl_rsa_dec);
      |         ^~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/rsa.h:520:5: note: declared here
  520 | int RSA_meth_set_priv_dec(RSA_METHOD *rsa,
      |     ^~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1069:9: warning: 'RSA_meth_set_priv_enc' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1069 |         RSA_meth_set_priv_enc (__openssl_methods.rsa, __pkcs11h_openssl_rsa_enc);
      |         ^~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/rsa.h:510:5: note: declared here
  510 | int RSA_meth_set_priv_enc(RSA_METHOD *rsa,
      |     ^~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1070:9: warning: 'RSA_meth_set_flags' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1070 |         RSA_meth_set_flags (__openssl_methods.rsa, RSA_METHOD_FLAG_NO_CHECK | RSA_FLAG_EXT_PKEY);
      |         ^~~~~~~~~~~~~~~~~~
/usr/include/openssl/rsa.h:480:27: note: declared here
  480 | OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1075:17: warning: passing argument 5 of 'CRYPTO_get_ex_new_index' from incompatible pointer type [-Wincompatible-pointer-types]
 1075 |                 __pkcs11h_openssl_ex_data_dup,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *) {aka int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)}
In file included from /usr/include/openssl/buffer.h:21,
                 from /usr/include/openssl/x509.h:28:
/usr/include/openssl/crypto.h:245:51: note: expected 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void **, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int,  long int,  void *)'} but argument is of type 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)'}
  245 |                                    CRYPTO_EX_dup *dup_func,
      |                                    ~~~~~~~~~~~~~~~^~~~~~~~
pkcs11h-openssl.c:1081:17: warning: 'DSA_meth_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1081 |                 DSA_meth_free (__openssl_methods.dsa);
      |                 ^~~~~~~~~~~~~
/usr/include/openssl/dsa.h:219:28: note: declared here
  219 | OSSL_DEPRECATEDIN_3_0 void DSA_meth_free(DSA_METHOD *dsam);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1083:9: warning: 'DSA_meth_dup' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1083 |         __openssl_methods.dsa = DSA_meth_dup (DSA_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
/usr/include/openssl/dsa.h:220:35: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam);
      |                                   ^~~~~~~~~~~~
pkcs11h-openssl.c:1083:9: warning: 'DSA_get_default_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1083 |         __openssl_methods.dsa = DSA_meth_dup (DSA_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
/usr/include/openssl/dsa.h:121:41: note: declared here
  121 | OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_default_method(void);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1084:9: warning: 'DSA_meth_set1_name' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1084 |         DSA_meth_set1_name (__openssl_methods.dsa, "pkcs11h");
      |         ^~~~~~~~~~~~~~~~~~
/usr/include/openssl/dsa.h:222:27: note: declared here
  222 | OSSL_DEPRECATEDIN_3_0 int DSA_meth_set1_name(DSA_METHOD *dsam,
      |                           ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1085:9: warning: 'DSA_meth_set_sign' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1085 |         DSA_meth_set_sign (__openssl_methods.dsa, __pkcs11h_openssl_dsa_do_sign);
      |         ^~~~~~~~~~~~~~~~~
/usr/include/openssl/dsa.h:231:27: note: declared here
  231 | OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_sign(DSA_METHOD *dsam,
      |                           ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1090:17: warning: passing argument 5 of 'CRYPTO_get_ex_new_index' from incompatible pointer type [-Wincompatible-pointer-types]
 1090 |                 __pkcs11h_openssl_ex_data_dup,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *) {aka int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)}
/usr/include/openssl/crypto.h:245:51: note: expected 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void **, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int,  long int,  void *)'} but argument is of type 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)'}
  245 |                                    CRYPTO_EX_dup *dup_func,
      |                                    ~~~~~~~~~~~~~~~^~~~~~~~
pkcs11h-openssl.c:1096:17: warning: 'EC_KEY_METHOD_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1096 |                 EC_KEY_METHOD_free(__openssl_methods.eckey);
      |                 ^~~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1462:28: note: declared here
 1462 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_free(EC_KEY_METHOD *meth);
      |                            ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1098:9: warning: 'EC_KEY_METHOD_new' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1098 |         __openssl_methods.eckey = EC_KEY_METHOD_new (EC_KEY_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1461:38: note: declared here
 1461 | OSSL_DEPRECATEDIN_3_0 EC_KEY_METHOD *EC_KEY_METHOD_new(const EC_KEY_METHOD *meth);
      |                                      ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1098:9: warning: 'EC_KEY_get_default_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1098 |         __openssl_methods.eckey = EC_KEY_METHOD_new (EC_KEY_get_default_method ());
      |         ^~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1280:44: note: declared here
 1280 | OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *EC_KEY_get_default_method(void);
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1111:17: warning: 'EC_KEY_METHOD_get_sign' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1111 |                 EC_KEY_METHOD_get_sign(__openssl_methods.eckey, &sig, NULL, NULL);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1524:28: note: declared here
 1524 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_get_sign
      |                            ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1112:17: warning: 'EC_KEY_METHOD_set_sign' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1112 |                 EC_KEY_METHOD_set_sign(__openssl_methods.eckey, sig, NULL, __pkcs11h_openssl_eckey_do_sign);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1480:28: note: declared here
 1480 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_set_sign
      |                            ^~~~~~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1118:17: warning: passing argument 5 of 'CRYPTO_get_ex_new_index' from incompatible pointer type [-Wincompatible-pointer-types]
 1118 |                 __pkcs11h_openssl_ex_data_dup,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *) {aka int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)}
/usr/include/openssl/crypto.h:245:51: note: expected 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void **, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int,  long int,  void *)'} but argument is of type 'int (*)(CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int,  long int,  void *)' {aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int,  long int,  void *)'}
  245 |                                    CRYPTO_EX_dup *dup_func,
      |                                    ~~~~~~~~~~~~~~~^~~~~~~~
pkcs11h-openssl.c: In function '_pkcs11h_openssl_terminate':
pkcs11h-openssl.c:1141:17: warning: 'RSA_meth_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1141 |                 RSA_meth_free (__openssl_methods.rsa);
      |                 ^~~~~~~~~~~~~
/usr/include/openssl/rsa.h:474:28: note: declared here
  474 | OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1147:17: warning: 'DSA_meth_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1147 |                 DSA_meth_free (__openssl_methods.dsa);
      |                 ^~~~~~~~~~~~~
/usr/include/openssl/dsa.h:219:28: note: declared here
  219 | OSSL_DEPRECATEDIN_3_0 void DSA_meth_free(DSA_METHOD *dsam);
      |                            ^~~~~~~~~~~~~
pkcs11h-openssl.c:1153:17: warning: 'EC_KEY_METHOD_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1153 |                 EC_KEY_METHOD_free(__openssl_methods.eckey);
      |                 ^~~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1462:28: note: declared here
 1462 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_free(EC_KEY_METHOD *meth);
      |                            ^~~~~~~~~~~~~~~~~~
pkcs11h-openssl.c: In function 'pkcs11h_openssl_session_getRSA':
pkcs11h-openssl.c:1395:17: warning: 'EVP_PKEY_get1_RSA' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1395 |                 (rsa = EVP_PKEY_get1_RSA (evp)) == NULL
      |                 ^
/usr/include/openssl/evp.h:1348:16: note: declared here
 1348 | struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
pkcs11h-openssl.c:1411:17: warning: 'RSA_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1411 |                 RSA_free (rsa);
      |                 ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
make[3]: *** [Makefile:619: pkcs11h-openssl.lo] Error 1
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/lib'
make[2]: *** [Makefile:493: all] Error 2
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27/lib'
make[1]: *** [Makefile:499: all-recursive] Error 1
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/pkcs11-helper-pkcs11-helper-1.27'
kloczek commented 2 years ago

Hmm .. looks like 086d5512 has not been included in 1.29.0 🤔

alonbl commented 2 years ago

Hmm .. looks like 086d551 has not been included in 1.29.0 🤔

It is included... I cannot find RSA_SSLV23_PADDING anywhere in source tree... Oh... are you sure you downloaded 1.29 and not 1.27?

kloczek commented 2 years ago

Really sorty .. my fault. By mistake I had hardcoded in the spec file exact version of the tar ball insytead using %{version} macro 😞 Just fixed that

--- pkcs11-helper.spec~ 2022-04-21 09:32:14.000000000 +0000
+++ pkcs11-helper.spec  2022-04-21 09:43:21.676912028 +0000
@@ -8,11 +8,10 @@
 License:       GPL-2.0 (https://opensource.org/licenses/GPL-2.0/) or BSD-3-Clause (https://opensource.org/licenses/BSD-3-Clause/)
 URL:           https://github.com/OpenSC/pkcs11-helper/
 VCS:           https://github.com/OpenSC/pkcs11-helper/
-Source0:       %{VCS}/archive/%{name}-1.27.tar.gz
+Source0:       %{VCS}/archive/%{name}-%{version}.tar.gz
 Patch00:       %{name}-do_not_install_some_doc.patch
 Patch01:       %{name}-libpkcs11-helper-1.pc_fixes.patch
 Patch02:       %{name}-ac_2.71.patch
-Patch03:       %{name}-build-openssl-remove-RSA_SSLV23_PADDING-constant-usage.patch
 BuildRequires: automake
 BuildRequires: doxygen
 BuildRequires: gcc
kloczek commented 2 years ago

BTW I have one patch whcih I think it is worth to add to the pkcs11-helper repo with some autoconf cleanups made semiautomatically using autoupdate from autoconf 2.71. Those changes are backward compatible with older autoconf

--- a/configure.ac~     2020-11-17 18:48:17.000000000 +0000
+++ b/configure.ac      2021-09-16 01:46:17.903677229 +0100
@@ -48,7 +48,7 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #

-AC_PREREQ(2.60)
+AC_PREREQ([2.69])

 define([PACKAGE_VERSION_MAJOR], [1])
 define([PACKAGE_VERSION_MINOR], [29])
@@ -87,7 +87,7 @@
 test -z "${WIN32}" && WIN32="no"
 test -z "${CYGWIN}" && CYGWIN="no"
 case "${host}" in
-       *-mingw*|*-winnt*)
+       *-mingw*|*-winnt*)
                WIN32="yes"
                WIN_LIBPREFIX="lib"
        ;;
@@ -254,19 +254,8 @@
 AC_ARG_VAR([M4], [m4 utility])
 AC_CHECK_PROGS([M4], [m4])

-ifdef(
-       [LT_INIT],
-       [
-               LT_INIT([win32-dll])
-               LT_LANG([Windows Resource])
-       ],
-       [
-               AC_LIBTOOL_WIN32_DLL
-               AC_LIBTOOL_RC
-               AC_PROG_LIBTOOL
-       ]
-)
-
+LT_INIT([win32-dll])
+LT_LANG([Windows Resource])

 if test "${enable_doc}" = "yes"; then
        AC_ARG_VAR([DOXYGEN], [doxygen utility])
@@ -403,7 +392,8 @@
 fi

 # Checks for header files.
-AC_HEADER_STDC
+AC_CHECK_INCLUDES_DEFAULT
+
 AX_CPP_VARARG_MACRO_ISO
 AX_CPP_VARARG_MACRO_GCC
 AC_C_CONST
@@ -412,7 +402,13 @@
 AC_TYPE_OFF_T
 AC_TYPE_PID_T
 AC_TYPE_SIZE_T
-AC_HEADER_TIME
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+       AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
+               and <time.h>.  This macro is obsolete.])
+fi
+
 AC_STRUCT_TM
 AX_SIZE_T_PRINTF
 AC_CHECK_HEADERS([ \

Please let me know if you want that as PR.

alonbl commented 2 years ago

ok, a sufficient time has passed since libtool-2 is out... so we can upgrade the dependencies.

kloczek commented 2 years ago

OK at evening will try to make PR 😄 PS. sorry to be a bit noisy 😜