php-build / php-build

Builds PHP so that multiple versions can be used side by side.
https://php-build.github.io
MIT License
1k stars 150 forks source link

FIX nothing below PHP 8.1 installs in Ubuntu 22.04 (`RSA_SSLV23_PADDING` undeclared in OpenSSL 3.0.0) #718

Closed allanlaal closed 10 months ago

allanlaal commented 2 years ago

my system has openssl 3.0.2-0ubuntu1.1

~/.phpenv/plugins/php-build/install-dependencies.sh:

autoconf is already the newest version (2.71-2).
bash is already the newest version (5.1-6ubuntu1).
bison is already the newest version (2:3.8.2+dfsg-1build1).
build-essential is already the newest version (12.9ubuntu3).
ca-certificates is already the newest version (20211016).
findutils is already the newest version (4.8.0-1ubuntu3).
libbz2-dev is already the newest version (1.0.8-5build1).
libicu-dev is already the newest version (70.1-2).
libjpeg-dev is already the newest version (8c-2ubuntu10).
libonig-dev is already the newest version (6.9.7.1-2build1).
libpng-dev is already the newest version (1.6.37-3build5).
libreadline-dev is already the newest version (8.1.2-1).
libsqlite3-dev is already the newest version (3.37.2-2).
libtidy-dev is already the newest version (2:5.6.0-11build2).
libxslt1-dev is already the newest version (1.1.34-4build2).
pkg-config is already the newest version (0.29.2-1ubuntu3).
re2c is already the newest version (3.0-1).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu9).
autoconf2.13 is already the newest version (2.13-69).
autoconf2.64 is already the newest version (2.64+dfsg-1).
libmcrypt-dev is already the newest version (2.5.8-7).
curl is already the newest version (7.81.0-1ubuntu1.2).
git is already the newest version (1:2.34.1-1ubuntu1.2).
libcurl4-gnutls-dev is already the newest version (7.81.0-1ubuntu1.2).
libssl-dev is already the newest version (3.0.2-0ubuntu1.2).
libxml2-dev is already the newest version (2.9.13+dfsg-1ubuntu0.1).
libzip-dev is already the newest version (1.7.3-1+ubuntu20.04.1+deb.sury.org+2).
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
allanlaal commented 2 years ago

phpenv install 7.1.32 results in:

$ phpenv install 7.1.32
[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: Loaded zendopcache Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 7.1.32 into /home/allan/.phpenv/versions/7.1.32
[Downloading]: https://secure.php.net/distributions/php-7.1.32.tar.bz2
[Preparing]: /tmp/php-build/source/7.1.32
[Compiling]: /tmp/php-build/source/7.1.32

-----------------
|  BUILD ERROR  |
-----------------

In file included from /tmp/php-build/source/7.1.32/main/php.h:413,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:30:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘zm_startup_openssl’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:1474:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
 1474 |         REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
      |                                                          ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/Zend/zend_constants.h:42:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
   42 | #define REGISTER_LONG_CONSTANT(name, lval, flags)  zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
      |                                                                                                         ^~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:1474:58: note: each undeclared identifier is reported only once for each function it appears in
 1474 |         REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
      |                                                          ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/Zend/zend_constants.h:42:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
   42 | #define REGISTER_LONG_CONSTANT(name, lval, flags)  zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
      |                                                                                                         ^~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘php_openssl_generate_private_key’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3898:49: warning: ‘RSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3898 |                                                 rsaparam = RSA_new();
      |                                                 ^~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3900:49: warning: ‘RSA_generate_key_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3900 |                                                 if (rsaparam == NULL || !RSA_generate_key_ex(rsaparam, req->priv_key_bits, bne, NULL)) {
      |                                                 ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:260:27: note: declared here
  260 | OSSL_DEPRECATEDIN_3_0 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e,
      |                           ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3906:41: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3906 |                                         if (rsaparam && EVP_PKEY_assign_RSA(req->priv_key, rsaparam)) {
      |                                         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3917:41: warning: ‘DSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3917 |                                         DSA *dsaparam = DSA_new();
      |                                         ^~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:125:28: note: declared here
  125 | OSSL_DEPRECATEDIN_3_0 DSA *DSA_new(void);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3918:41: warning: ‘DSA_generate_parameters_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3918 |                                         if (dsaparam && DSA_generate_parameters_ex(dsaparam, req->priv_key_bits, NULL, 0, NULL, NULL, NULL)) {
      |                                         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:167:27: note: declared here
  167 | OSSL_DEPRECATEDIN_3_0 int DSA_generate_parameters_ex(DSA *dsa, int bits,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3919:49: warning: ‘DSA_set_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3919 |                                                 DSA_set_method(dsaparam, DSA_get_default_method());
      |                                                 ^~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:122:27: note: declared here
  122 | OSSL_DEPRECATEDIN_3_0 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
      |                           ^~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3919:49: warning: ‘DSA_get_default_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3919 |                                                 DSA_set_method(dsaparam, DSA_get_default_method());
      |                                                 ^~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:121:41: note: declared here
  121 | OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_default_method(void);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3920:49: warning: ‘DSA_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3920 |                                                 if (DSA_generate_key(dsaparam)) {
      |                                                 ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:174:27: note: declared here
  174 | OSSL_DEPRECATEDIN_3_0 int DSA_generate_key(DSA *a);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3921:57: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3921 |                                                         if (EVP_PKEY_assign_DSA(req->priv_key, dsaparam)) {
      |                                                         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3928:57: warning: ‘DSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3928 |                                                         DSA_free(dsaparam);
      |                                                         ^~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:127:28: note: declared here
  127 | OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3941:41: warning: ‘DH_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3941 |                                         DH *dhparam = DH_new();
      |                                         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:199:27: note: declared here
  199 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
      |                           ^~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3942:41: warning: ‘DH_generate_parameters_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3942 |                                         if (dhparam && DH_generate_parameters_ex(dhparam, req->priv_key_bits, 2, NULL)) {
      |                                         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:212:27: note: declared here
  212 | OSSL_DEPRECATEDIN_3_0 int DH_generate_parameters_ex(DH *dh, int prime_len,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3943:49: warning: ‘DH_set_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3943 |                                                 DH_set_method(dhparam, DH_get_default_method());
      |                                                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:196:27: note: declared here
  196 | OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth);
      |                           ^~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3943:49: warning: ‘DH_get_default_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3943 |                                                 DH_set_method(dhparam, DH_get_default_method());
      |                                                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:195:40: note: declared here
  195 | OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_get_default_method(void);
      |                                        ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3944:49: warning: ‘DH_check’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3944 |                                                 if (DH_check(dhparam, &codes) && codes == 0 && DH_generate_key(dhparam)) {
      |                                                 ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:220:27: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 int DH_check(const DH *dh, int *codes);
      |                           ^~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3944:49: warning: ‘DH_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3944 |                                                 if (DH_check(dhparam, &codes) && codes == 0 && DH_generate_key(dhparam)) {
      |                                                 ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:223:27: note: declared here
  223 | OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
      |                           ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3945:57: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3945 |                                                         if (EVP_PKEY_assign_DH(req->priv_key, dhparam)) {
      |                                                         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3952:57: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3952 |                                                         DH_free(dhparam);
      |                                                         ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3967:41: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3967 |                                         EC_KEY *eckey = EC_KEY_new_by_curve_name(req->curve_name);
      |                                         ^~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:998:31: note: declared here
  998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3969:49: warning: ‘EC_KEY_set_asn1_flag’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3969 |                                                 EC_KEY_set_asn1_flag(eckey, OPENSSL_EC_NAMED_CURVE);
      |                                                 ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1087:28: note: declared here
 1087 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
      |                            ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3970:49: warning: ‘EC_KEY_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3970 |                                                 if (EC_KEY_generate_key(eckey) &&
      |                                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1101:27: note: declared here
 1101 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_generate_key(EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3971:57: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3971 |                                                         EVP_PKEY_assign_EC_KEY(req->priv_key, eckey)) {
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:3974:57: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3974 |                                                         EC_KEY_free(eckey);
      |                                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘php_openssl_is_private_key’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4009:33: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4009 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4009:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4009 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4013:41: warning: ‘RSA_get0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4013 |                                         RSA_get0_factors(rsa, &p, &q);
      |                                         ^~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:220:28: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_factors(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4026:33: warning: ‘EVP_PKEY_get0_DSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4026 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1355:22: note: declared here
 1355 | const struct dsa_st *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4026:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4026 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4030:41: warning: ‘DSA_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4030 |                                         DSA_get0_pqg(dsa, &p, &q, &g);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4035:41: warning: ‘DSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4035 |                                         DSA_get0_key(dsa, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:204:28: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4044:33: warning: ‘EVP_PKEY_get0_DH’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4044 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                 ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1363:43: note: declared here
 1363 | OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
      |                                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4044:42: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4044 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                          ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4048:41: warning: ‘DH_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4048 |                                         DH_get0_pqg(dh, &p, &q, &g);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:253:28: note: declared here
  253 | OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4053:41: warning: ‘DH_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4053 |                                         DH_get0_key(dh, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:256:28: note: declared here
  256 | OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4063:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4063 |                                 EC_KEY *ec = EVP_PKEY_get0_EC_KEY(pkey);
      |                                 ^~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4063:46: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4063 |                                 EC_KEY *ec = EVP_PKEY_get0_EC_KEY(pkey);
      |                                              ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4064:33: warning: ‘EC_KEY_get0_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4064 |                                 if (ec != NULL && NULL == EC_KEY_get0_private_key(ec)) {
      |                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1048:37: note: declared here
 1048 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_and_assign_rsa’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4110:9: warning: ‘RSA_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4110 |         if (!n || !d || !RSA_set0_key(rsa, n, e, d)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:207:27: note: declared here
  207 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
      |                           ^~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4116:9: warning: ‘RSA_set0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4116 |         if ((p || q) && !RSA_set0_factors(rsa, p, q)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:208:27: note: declared here
  208 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4123:9: warning: ‘RSA_set0_crt_params’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4123 |         if ((dmp1 || dmq1 || iqmp) && !RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:209:27: note: declared here
  209 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_crt_params(RSA *r,
      |                           ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4127:9: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4127 |         if (!EVP_PKEY_assign_RSA(pkey, rsa)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dsa’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4144:9: warning: ‘DSA_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4144 |         if (!p || !q || !g || !DSA_set0_pqg(dsa, p, q, g)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:203:27: note: declared here
  203 | OSSL_DEPRECATEDIN_3_0 int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
      |                           ^~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4151:17: warning: ‘DSA_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4151 |                 return DSA_set0_key(dsa, pub_key, priv_key);
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:206:27: note: declared here
  206 | OSSL_DEPRECATEDIN_3_0 int DSA_set0_key(DSA *d, BIGNUM *pub_key,
      |                           ^~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4156:9: warning: ‘DSA_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4156 |         if (!DSA_generate_key(dsa)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:174:27: note: declared here
  174 | OSSL_DEPRECATEDIN_3_0 int DSA_generate_key(DSA *a);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4163:9: warning: ‘DSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4163 |         DSA_get0_key(dsa, &pub_key_const, &priv_key_const);
      |         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:204:28: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dh’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4221:9: warning: ‘DH_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4221 |         if (!p || !g || !DH_set0_pqg(dh, p, q, g)) {
      |         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:255:27: note: declared here
  255 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
      |                           ^~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4228:17: warning: ‘DH_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4228 |                 return DH_set0_key(dh, pub_key, priv_key);
      |                 ^~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:258:27: note: declared here
  258 | OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
      |                           ^~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4235:17: warning: ‘DH_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4235 |                 return DH_set0_key(dh, pub_key, priv_key);
      |                 ^~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:258:27: note: declared here
  258 | OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
      |                           ^~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4240:9: warning: ‘DH_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4240 |         if (!DH_generate_key(dh)) {
      |         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:223:27: note: declared here
  223 | OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
      |                           ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_new’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4269:33: warning: ‘RSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4269 |                                 RSA *rsa = RSA_new();
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4274:41: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4274 |                                         RSA_free(rsa);
      |                                         ^~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4287:33: warning: ‘DSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4287 |                                 DSA *dsa = DSA_new();
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:125:28: note: declared here
  125 | OSSL_DEPRECATEDIN_3_0 DSA *DSA_new(void);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4290:49: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4290 |                                                 if (EVP_PKEY_assign_DSA(pkey, dsa)) {
      |                                                 ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4296:41: warning: ‘DSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4296 |                                         DSA_free(dsa);
      |                                         ^~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:127:28: note: declared here
  127 | OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4309:33: warning: ‘DH_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4309 |                                 DH *dh = DH_new();
      |                                 ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:199:27: note: declared here
  199 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
      |                           ^~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4312:49: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4312 |                                                 if (EVP_PKEY_assign_DH(pkey, dh)) {
      |                                                 ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4319:41: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4319 |                                         DH_free(dh);
      |                                         ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4337:33: warning: ‘EC_KEY_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4337 |                                 eckey = EC_KEY_new();
      |                                 ^~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:968:31: note: declared here
  968 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new(void);
      |                               ^~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4355:57: warning: ‘EC_KEY_set_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4355 |                                                         if (!EC_KEY_set_group(eckey, group)) {
      |                                                         ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1042:27: note: declared here
 1042 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4371:49: warning: ‘EC_KEY_set_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4371 |                                                 if (!EC_KEY_set_private_key(eckey, d)) {
      |                                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1056:27: note: declared here
 1056 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
      |                           ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4391:49: warning: ‘EC_POINT_set_affine_coordinates_GFp’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4391 |                                                 if (!EC_POINT_set_affine_coordinates_GFp(
      |                                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:646:27: note: declared here
  646 | OSSL_DEPRECATEDIN_3_0 int EC_POINT_set_affine_coordinates_GFp
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4400:49: warning: ‘EC_KEY_set_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4400 |                                                 if (!EC_KEY_set_public_key(eckey, pnt)) {
      |                                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1070:27: note: declared here
 1070 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
      |                           ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4408:41: warning: ‘EC_KEY_check_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4408 |                                         if (!EC_KEY_check_key(eckey)) {
      |                                         ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1107:27: note: declared here
 1107 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_check_key(const EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4410:49: warning: ‘EC_KEY_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4410 |                                                 EC_KEY_generate_key(eckey);
      |                                                 ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1101:27: note: declared here
 1101 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_generate_key(EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4413:41: warning: ‘EC_KEY_check_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4413 |                                         if (EC_KEY_check_key(eckey) && EVP_PKEY_assign_EC_KEY(pkey, eckey)) {
      |                                         ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1107:27: note: declared here
 1107 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_check_key(const EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4413:41: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4413 |                                         if (EC_KEY_check_key(eckey) && EVP_PKEY_assign_EC_KEY(pkey, eckey)) {
      |                                         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4433:33: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4433 |                                 EC_KEY_free(eckey);
      |                                 ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_export_to_file’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4513:33: warning: ‘PEM_write_bio_ECPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4513 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get0_EC_KEY(key), cipher, (unsigned char *)passphrase, (int)passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:53:
/usr/include/openssl/pem.h:462:1: note: declared here
  462 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, ECPrivateKey, EC_KEY)
      | ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4513:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4513 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get0_EC_KEY(key), cipher, (unsigned char *)passphrase, (int)passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_export’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4586:33: warning: ‘PEM_write_bio_ECPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4586 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get0_EC_KEY(key), cipher, (unsigned char *)passphrase, (int)passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:53:
/usr/include/openssl/pem.h:462:1: note: declared here
  462 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, ECPrivateKey, EC_KEY)
      | ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4586:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4586 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get0_EC_KEY(key), cipher, (unsigned char *)passphrase, (int)passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_get_details’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4718:33: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4718 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4718:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4718 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4725:41: warning: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4725 |                                         RSA_get0_key(rsa, &n, &e, &d);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:217:28: note: declared here
  217 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4726:41: warning: ‘RSA_get0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4726 |                                         RSA_get0_factors(rsa, &p, &q);
      |                                         ^~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:220:28: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_factors(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4727:41: warning: ‘RSA_get0_crt_params’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4727 |                                         RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp);
      |                                         ^~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:225:28: note: declared here
  225 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_crt_params(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4747:33: warning: ‘EVP_PKEY_get0_DSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4747 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1355:22: note: declared here
 1355 | const struct dsa_st *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4747:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4747 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4754:41: warning: ‘DSA_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4754 |                                         DSA_get0_pqg(dsa, &p, &q, &g);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4755:41: warning: ‘DSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4755 |                                         DSA_get0_key(dsa, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:204:28: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4769:33: warning: ‘EVP_PKEY_get0_DH’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4769 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                 ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1363:43: note: declared here
 1363 | OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
      |                                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4769:42: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4769 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                          ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4776:41: warning: ‘DH_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4776 |                                         DH_get0_pqg(dh, &p, &q, &g);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:253:28: note: declared here
  253 | OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4777:41: warning: ‘DH_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4777 |                                         DH_get0_key(dh, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:256:28: note: declared here
  256 | OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4791:25: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4791 |                         if (EVP_PKEY_get0_EC_KEY(pkey) != NULL) {
      |                         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4800:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4800 |                                 const EC_KEY *ec_key = EVP_PKEY_get0_EC_KEY(pkey);
      |                                 ^~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4805:33: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4805 |                                 ec_group = EC_KEY_get0_group(ec_key);
      |                                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4827:33: warning: ‘EC_KEY_get0_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4827 |                                 pub = EC_KEY_get0_public_key(ec_key);
      |                                 ^~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1062:39: note: declared here
 1062 | OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4829:33: warning: ‘EC_POINT_get_affine_coordinates_GFp’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4829 |                                 if (EC_POINT_get_affine_coordinates_GFp(ec_group, pub, x, y, NULL)) {
      |                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:659:27: note: declared here
  659 | OSSL_DEPRECATEDIN_3_0 int EC_POINT_get_affine_coordinates_GFp
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4836:33: warning: ‘EC_KEY_get0_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4836 |                                 if ((d = EC_KEY_get0_private_key(EVP_PKEY_get0_EC_KEY(pkey))) != NULL) {
      |                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1048:37: note: declared here
 1048 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4836:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4836 |                                 if ((d = EC_KEY_get0_private_key(EVP_PKEY_get0_EC_KEY(pkey))) != NULL) {
      |                                 ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘zif_openssl_dh_compute_key’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4879:9: warning: ‘EVP_PKEY_get0_DH’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4879 |         dh = EVP_PKEY_get0_DH(pkey);
      |         ^~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1363:43: note: declared here
 1363 | OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
      |                                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4879:12: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4879 |         dh = EVP_PKEY_get0_DH(pkey);
      |            ^
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4887:9: warning: ‘DH_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4887 |         data = zend_string_alloc(DH_size(dh), 0);
      |         ^~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:203:27: note: declared here
  203 | OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh);
      |                           ^~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:4888:9: warning: ‘DH_compute_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4888 |         len = DH_compute_key((unsigned char*)ZSTR_VAL(data), pub, dh);
      |         ^~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:224:27: note: declared here
  224 | OSSL_DEPRECATEDIN_3_0 int DH_compute_key(unsigned char *key,
      |                           ^~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘zif_openssl_private_encrypt’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5455:25: warning: ‘RSA_private_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5455 |                         successful = (RSA_private_encrypt((int)data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:285:5: note: declared here
  285 | int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5458:49: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5458 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5458:49: warning: passing argument 4 of ‘RSA_private_encrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5458 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:286:30: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  286 |                         RSA *rsa, int padding);
      |                         ~~~~~^~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘zif_openssl_private_decrypt’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5517:25: warning: ‘RSA_private_decrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5517 |                         cryptedlen = RSA_private_decrypt((int)data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:291:5: note: declared here
  291 | int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5520:41: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5520 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5520:41: warning: passing argument 4 of ‘RSA_private_decrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5520 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:292:30: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  292 |                         RSA *rsa, int padding);
      |                         ~~~~~^~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘zif_openssl_public_encrypt’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5585:25: warning: ‘RSA_public_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5585 |                         successful = (RSA_public_encrypt((int)data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:282:5: note: declared here
  282 | int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5588:49: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5588 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5588:49: warning: passing argument 4 of ‘RSA_public_encrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5588 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:283:29: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  283 |                        RSA *rsa, int padding);
      |                        ~~~~~^~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c: In function ‘zif_openssl_public_decrypt’:
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5648:25: warning: ‘RSA_public_decrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5648 |                         cryptedlen = RSA_public_decrypt((int)data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:288:5: note: declared here
  288 | int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5651:41: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5651 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:5651:41: warning: passing argument 4 of ‘RSA_public_decrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5651 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:289:29: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  289 |                        RSA *rsa, int padding);
      |                        ~~~~~^~~
make: *** [Makefile:704: ext/openssl/openssl.lo] Error 1
make: *** Waiting for unfinished jobs....
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c: In function ‘php_select_crypto_method’:
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:952:17: warning: ‘TLSv1_client_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  952 |                 return is_client ? TLSv1_client_method() : TLSv1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2006:50: note: declared here
 2006 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_client_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:952:17: warning: ‘TLSv1_server_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  952 |                 return is_client ? TLSv1_client_method() : TLSv1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2005:50: note: declared here
 2005 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_server_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:955:17: warning: ‘TLSv1_1_client_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  955 |                 return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2014:50: note: declared here
 2014 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_1_client_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:955:17: warning: ‘TLSv1_1_server_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  955 |                 return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2013:50: note: declared here
 2013 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_1_server_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:963:17: warning: ‘TLSv1_2_client_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  963 |                 return is_client ? TLSv1_2_client_method() : TLSv1_2_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2022:50: note: declared here
 2022 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_2_client_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:963:17: warning: ‘TLSv1_2_server_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  963 |                 return is_client ? TLSv1_2_client_method() : TLSv1_2_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2021:50: note: declared here
 2021 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_2_server_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c: In function ‘set_server_dh_param’:
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:1182:9: warning: ‘PEM_read_bio_DHparams’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1182 |         dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
      |         ^~
In file included from /usr/include/openssl/ssl.h:36,
                 from /tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/pem.h:469:1: note: declared here
  469 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)
      | ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:1192:17: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1192 |                 DH_free(dh);
      |                 ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /usr/include/openssl/x509.h:37,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:1196:9: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1196 |         DH_free(dh);
      |         ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /usr/include/openssl/x509.h:37,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/7.1.32/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
allanlaal commented 2 years ago

then I used build-openssl-1.0.sh to get OpenSSL 1:

phpenv install 7.1.33 --with-openssl=/usr/local/opt/openssl@1.0/lib64

results in:

    [Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: Loaded zendopcache Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 7.1.33 into /home/allan/.phpenv/versions/7.1.33
[Skipping]: Already downloaded and extracted https://secure.php.net/distributions/php-7.1.33.tar.bz2
[Preparing]: /tmp/php-build/source/7.1.33
[Compiling]: /tmp/php-build/source/7.1.33

-----------------
|  BUILD ERROR  |
-----------------

In file included from /tmp/php-build/source/7.1.33/main/php.h:413,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:30:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘zm_startup_openssl’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:1474:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
 1474 |         REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
      |                                                          ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/Zend/zend_constants.h:42:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
   42 | #define REGISTER_LONG_CONSTANT(name, lval, flags)  zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
      |                                                                                                         ^~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:1474:58: note: each undeclared identifier is reported only once for each function it appears in
 1474 |         REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
      |                                                          ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/Zend/zend_constants.h:42:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
   42 | #define REGISTER_LONG_CONSTANT(name, lval, flags)  zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
      |                                                                                                         ^~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘php_openssl_generate_private_key’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3898:49: warning: ‘RSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3898 |                                                 rsaparam = RSA_new();
      |                                                 ^~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3900:49: warning: ‘RSA_generate_key_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3900 |                                                 if (rsaparam == NULL || !RSA_generate_key_ex(rsaparam, req->priv_key_bits, bne, NULL)) {
      |                                                 ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:260:27: note: declared here
  260 | OSSL_DEPRECATEDIN_3_0 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e,
      |                           ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3906:41: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3906 |                                         if (rsaparam && EVP_PKEY_assign_RSA(req->priv_key, rsaparam)) {
      |                                         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3917:41: warning: ‘DSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3917 |                                         DSA *dsaparam = DSA_new();
      |                                         ^~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:125:28: note: declared here
  125 | OSSL_DEPRECATEDIN_3_0 DSA *DSA_new(void);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3918:41: warning: ‘DSA_generate_parameters_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3918 |                                         if (dsaparam && DSA_generate_parameters_ex(dsaparam, req->priv_key_bits, NULL, 0, NULL, NULL, NULL)) {
      |                                         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:167:27: note: declared here
  167 | OSSL_DEPRECATEDIN_3_0 int DSA_generate_parameters_ex(DSA *dsa, int bits,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3919:49: warning: ‘DSA_set_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3919 |                                                 DSA_set_method(dsaparam, DSA_get_default_method());
      |                                                 ^~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:122:27: note: declared here
  122 | OSSL_DEPRECATEDIN_3_0 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
      |                           ^~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3919:49: warning: ‘DSA_get_default_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3919 |                                                 DSA_set_method(dsaparam, DSA_get_default_method());
      |                                                 ^~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:121:41: note: declared here
  121 | OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_default_method(void);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3920:49: warning: ‘DSA_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3920 |                                                 if (DSA_generate_key(dsaparam)) {
      |                                                 ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:174:27: note: declared here
  174 | OSSL_DEPRECATEDIN_3_0 int DSA_generate_key(DSA *a);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3921:57: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3921 |                                                         if (EVP_PKEY_assign_DSA(req->priv_key, dsaparam)) {
      |                                                         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3928:57: warning: ‘DSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3928 |                                                         DSA_free(dsaparam);
      |                                                         ^~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:127:28: note: declared here
  127 | OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3941:41: warning: ‘DH_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3941 |                                         DH *dhparam = DH_new();
      |                                         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:199:27: note: declared here
  199 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
      |                           ^~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3942:41: warning: ‘DH_generate_parameters_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3942 |                                         if (dhparam && DH_generate_parameters_ex(dhparam, req->priv_key_bits, 2, NULL)) {
      |                                         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:212:27: note: declared here
  212 | OSSL_DEPRECATEDIN_3_0 int DH_generate_parameters_ex(DH *dh, int prime_len,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3943:49: warning: ‘DH_set_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3943 |                                                 DH_set_method(dhparam, DH_get_default_method());
      |                                                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:196:27: note: declared here
  196 | OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth);
      |                           ^~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3943:49: warning: ‘DH_get_default_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3943 |                                                 DH_set_method(dhparam, DH_get_default_method());
      |                                                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:195:40: note: declared here
  195 | OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_get_default_method(void);
      |                                        ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3944:49: warning: ‘DH_check’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3944 |                                                 if (DH_check(dhparam, &codes) && codes == 0 && DH_generate_key(dhparam)) {
      |                                                 ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:220:27: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 int DH_check(const DH *dh, int *codes);
      |                           ^~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3944:49: warning: ‘DH_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3944 |                                                 if (DH_check(dhparam, &codes) && codes == 0 && DH_generate_key(dhparam)) {
      |                                                 ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:223:27: note: declared here
  223 | OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
      |                           ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3945:57: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3945 |                                                         if (EVP_PKEY_assign_DH(req->priv_key, dhparam)) {
      |                                                         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3952:57: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3952 |                                                         DH_free(dhparam);
      |                                                         ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3967:41: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3967 |                                         EC_KEY *eckey = EC_KEY_new_by_curve_name(req->curve_name);
      |                                         ^~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:998:31: note: declared here
  998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3969:49: warning: ‘EC_KEY_set_asn1_flag’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3969 |                                                 EC_KEY_set_asn1_flag(eckey, OPENSSL_EC_NAMED_CURVE);
      |                                                 ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1087:28: note: declared here
 1087 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
      |                            ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3970:49: warning: ‘EC_KEY_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3970 |                                                 if (EC_KEY_generate_key(eckey) &&
      |                                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1101:27: note: declared here
 1101 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_generate_key(EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3971:57: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3971 |                                                         EVP_PKEY_assign_EC_KEY(req->priv_key, eckey)) {
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:3974:57: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3974 |                                                         EC_KEY_free(eckey);
      |                                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘php_openssl_is_private_key’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4009:33: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4009 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4009:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4009 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4013:41: warning: ‘RSA_get0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4013 |                                         RSA_get0_factors(rsa, &p, &q);
      |                                         ^~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:220:28: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_factors(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4026:33: warning: ‘EVP_PKEY_get0_DSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4026 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1355:22: note: declared here
 1355 | const struct dsa_st *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4026:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4026 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4030:41: warning: ‘DSA_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4030 |                                         DSA_get0_pqg(dsa, &p, &q, &g);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4035:41: warning: ‘DSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4035 |                                         DSA_get0_key(dsa, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:204:28: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4044:33: warning: ‘EVP_PKEY_get0_DH’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4044 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                 ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1363:43: note: declared here
 1363 | OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
      |                                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4044:42: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4044 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                          ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4048:41: warning: ‘DH_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4048 |                                         DH_get0_pqg(dh, &p, &q, &g);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:253:28: note: declared here
  253 | OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4053:41: warning: ‘DH_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4053 |                                         DH_get0_key(dh, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:256:28: note: declared here
  256 | OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4063:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4063 |                                 EC_KEY *ec = EVP_PKEY_get0_EC_KEY(pkey);
      |                                 ^~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4063:46: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4063 |                                 EC_KEY *ec = EVP_PKEY_get0_EC_KEY(pkey);
      |                                              ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4064:33: warning: ‘EC_KEY_get0_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4064 |                                 if (ec != NULL && NULL == EC_KEY_get0_private_key(ec)) {
      |                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1048:37: note: declared here
 1048 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_and_assign_rsa’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4110:9: warning: ‘RSA_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4110 |         if (!n || !d || !RSA_set0_key(rsa, n, e, d)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:207:27: note: declared here
  207 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
      |                           ^~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4116:9: warning: ‘RSA_set0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4116 |         if ((p || q) && !RSA_set0_factors(rsa, p, q)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:208:27: note: declared here
  208 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4123:9: warning: ‘RSA_set0_crt_params’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4123 |         if ((dmp1 || dmq1 || iqmp) && !RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:209:27: note: declared here
  209 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_crt_params(RSA *r,
      |                           ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4127:9: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4127 |         if (!EVP_PKEY_assign_RSA(pkey, rsa)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dsa’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4144:9: warning: ‘DSA_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4144 |         if (!p || !q || !g || !DSA_set0_pqg(dsa, p, q, g)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:203:27: note: declared here
  203 | OSSL_DEPRECATEDIN_3_0 int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
      |                           ^~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4151:17: warning: ‘DSA_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4151 |                 return DSA_set0_key(dsa, pub_key, priv_key);
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:206:27: note: declared here
  206 | OSSL_DEPRECATEDIN_3_0 int DSA_set0_key(DSA *d, BIGNUM *pub_key,
      |                           ^~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4156:9: warning: ‘DSA_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4156 |         if (!DSA_generate_key(dsa)) {
      |         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:174:27: note: declared here
  174 | OSSL_DEPRECATEDIN_3_0 int DSA_generate_key(DSA *a);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4163:9: warning: ‘DSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4163 |         DSA_get0_key(dsa, &pub_key_const, &priv_key_const);
      |         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:204:28: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dh’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4221:9: warning: ‘DH_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4221 |         if (!p || !g || !DH_set0_pqg(dh, p, q, g)) {
      |         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:255:27: note: declared here
  255 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
      |                           ^~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4228:17: warning: ‘DH_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4228 |                 return DH_set0_key(dh, pub_key, priv_key);
      |                 ^~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:258:27: note: declared here
  258 | OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
      |                           ^~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4235:17: warning: ‘DH_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4235 |                 return DH_set0_key(dh, pub_key, priv_key);
      |                 ^~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:258:27: note: declared here
  258 | OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
      |                           ^~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4240:9: warning: ‘DH_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4240 |         if (!DH_generate_key(dh)) {
      |         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:223:27: note: declared here
  223 | OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
      |                           ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_new’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4269:33: warning: ‘RSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4269 |                                 RSA *rsa = RSA_new();
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4274:41: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4274 |                                         RSA_free(rsa);
      |                                         ^~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4287:33: warning: ‘DSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4287 |                                 DSA *dsa = DSA_new();
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:125:28: note: declared here
  125 | OSSL_DEPRECATEDIN_3_0 DSA *DSA_new(void);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4290:49: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4290 |                                                 if (EVP_PKEY_assign_DSA(pkey, dsa)) {
      |                                                 ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4296:41: warning: ‘DSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4296 |                                         DSA_free(dsa);
      |                                         ^~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:127:28: note: declared here
  127 | OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4309:33: warning: ‘DH_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4309 |                                 DH *dh = DH_new();
      |                                 ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:199:27: note: declared here
  199 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
      |                           ^~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4312:49: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4312 |                                                 if (EVP_PKEY_assign_DH(pkey, dh)) {
      |                                                 ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4319:41: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4319 |                                         DH_free(dh);
      |                                         ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4337:33: warning: ‘EC_KEY_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4337 |                                 eckey = EC_KEY_new();
      |                                 ^~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:968:31: note: declared here
  968 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new(void);
      |                               ^~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4355:57: warning: ‘EC_KEY_set_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4355 |                                                         if (!EC_KEY_set_group(eckey, group)) {
      |                                                         ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1042:27: note: declared here
 1042 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4371:49: warning: ‘EC_KEY_set_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4371 |                                                 if (!EC_KEY_set_private_key(eckey, d)) {
      |                                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1056:27: note: declared here
 1056 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
      |                           ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4391:49: warning: ‘EC_POINT_set_affine_coordinates_GFp’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4391 |                                                 if (!EC_POINT_set_affine_coordinates_GFp(
      |                                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:646:27: note: declared here
  646 | OSSL_DEPRECATEDIN_3_0 int EC_POINT_set_affine_coordinates_GFp
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4400:49: warning: ‘EC_KEY_set_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4400 |                                                 if (!EC_KEY_set_public_key(eckey, pnt)) {
      |                                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1070:27: note: declared here
 1070 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
      |                           ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4408:41: warning: ‘EC_KEY_check_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4408 |                                         if (!EC_KEY_check_key(eckey)) {
      |                                         ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1107:27: note: declared here
 1107 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_check_key(const EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4410:49: warning: ‘EC_KEY_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4410 |                                                 EC_KEY_generate_key(eckey);
      |                                                 ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1101:27: note: declared here
 1101 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_generate_key(EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4413:41: warning: ‘EC_KEY_check_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4413 |                                         if (EC_KEY_check_key(eckey) && EVP_PKEY_assign_EC_KEY(pkey, eckey)) {
      |                                         ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1107:27: note: declared here
 1107 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_check_key(const EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4413:41: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4413 |                                         if (EC_KEY_check_key(eckey) && EVP_PKEY_assign_EC_KEY(pkey, eckey)) {
      |                                         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4433:33: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4433 |                                 EC_KEY_free(eckey);
      |                                 ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_export_to_file’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4513:33: warning: ‘PEM_write_bio_ECPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4513 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get0_EC_KEY(key), cipher, (unsigned char *)passphrase, (int)passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:53:
/usr/include/openssl/pem.h:462:1: note: declared here
  462 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, ECPrivateKey, EC_KEY)
      | ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4513:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4513 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get0_EC_KEY(key), cipher, (unsigned char *)passphrase, (int)passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_export’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4586:33: warning: ‘PEM_write_bio_ECPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4586 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get0_EC_KEY(key), cipher, (unsigned char *)passphrase, (int)passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:53:
/usr/include/openssl/pem.h:462:1: note: declared here
  462 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, ECPrivateKey, EC_KEY)
      | ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4586:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4586 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get0_EC_KEY(key), cipher, (unsigned char *)passphrase, (int)passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_get_details’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4718:33: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4718 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4718:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4718 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4725:41: warning: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4725 |                                         RSA_get0_key(rsa, &n, &e, &d);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:217:28: note: declared here
  217 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4726:41: warning: ‘RSA_get0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4726 |                                         RSA_get0_factors(rsa, &p, &q);
      |                                         ^~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:220:28: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_factors(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4727:41: warning: ‘RSA_get0_crt_params’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4727 |                                         RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp);
      |                                         ^~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:225:28: note: declared here
  225 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_crt_params(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4747:33: warning: ‘EVP_PKEY_get0_DSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4747 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1355:22: note: declared here
 1355 | const struct dsa_st *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4747:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4747 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4754:41: warning: ‘DSA_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4754 |                                         DSA_get0_pqg(dsa, &p, &q, &g);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4755:41: warning: ‘DSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4755 |                                         DSA_get0_key(dsa, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:204:28: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4769:33: warning: ‘EVP_PKEY_get0_DH’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4769 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                 ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1363:43: note: declared here
 1363 | OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
      |                                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4769:42: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4769 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                          ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4776:41: warning: ‘DH_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4776 |                                         DH_get0_pqg(dh, &p, &q, &g);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:253:28: note: declared here
  253 | OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4777:41: warning: ‘DH_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4777 |                                         DH_get0_key(dh, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:256:28: note: declared here
  256 | OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4791:25: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4791 |                         if (EVP_PKEY_get0_EC_KEY(pkey) != NULL) {
      |                         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4800:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4800 |                                 const EC_KEY *ec_key = EVP_PKEY_get0_EC_KEY(pkey);
      |                                 ^~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4805:33: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4805 |                                 ec_group = EC_KEY_get0_group(ec_key);
      |                                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4827:33: warning: ‘EC_KEY_get0_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4827 |                                 pub = EC_KEY_get0_public_key(ec_key);
      |                                 ^~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1062:39: note: declared here
 1062 | OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4829:33: warning: ‘EC_POINT_get_affine_coordinates_GFp’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4829 |                                 if (EC_POINT_get_affine_coordinates_GFp(ec_group, pub, x, y, NULL)) {
      |                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:659:27: note: declared here
  659 | OSSL_DEPRECATEDIN_3_0 int EC_POINT_get_affine_coordinates_GFp
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4836:33: warning: ‘EC_KEY_get0_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4836 |                                 if ((d = EC_KEY_get0_private_key(EVP_PKEY_get0_EC_KEY(pkey))) != NULL) {
      |                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:50:
/usr/include/openssl/ec.h:1048:37: note: declared here
 1048 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4836:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4836 |                                 if ((d = EC_KEY_get0_private_key(EVP_PKEY_get0_EC_KEY(pkey))) != NULL) {
      |                                 ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘zif_openssl_dh_compute_key’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4879:9: warning: ‘EVP_PKEY_get0_DH’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4879 |         dh = EVP_PKEY_get0_DH(pkey);
      |         ^~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1363:43: note: declared here
 1363 | OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
      |                                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4879:12: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4879 |         dh = EVP_PKEY_get0_DH(pkey);
      |            ^
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4887:9: warning: ‘DH_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4887 |         data = zend_string_alloc(DH_size(dh), 0);
      |         ^~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:203:27: note: declared here
  203 | OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh);
      |                           ^~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:4888:9: warning: ‘DH_compute_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4888 |         len = DH_compute_key((unsigned char*)ZSTR_VAL(data), pub, dh);
      |         ^~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:224:27: note: declared here
  224 | OSSL_DEPRECATEDIN_3_0 int DH_compute_key(unsigned char *key,
      |                           ^~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘zif_openssl_private_encrypt’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5455:25: warning: ‘RSA_private_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5455 |                         successful = (RSA_private_encrypt((int)data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:285:5: note: declared here
  285 | int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5458:49: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5458 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5458:49: warning: passing argument 4 of ‘RSA_private_encrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5458 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:286:30: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  286 |                         RSA *rsa, int padding);
      |                         ~~~~~^~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘zif_openssl_private_decrypt’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5517:25: warning: ‘RSA_private_decrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5517 |                         cryptedlen = RSA_private_decrypt((int)data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:291:5: note: declared here
  291 | int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5520:41: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5520 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5520:41: warning: passing argument 4 of ‘RSA_private_decrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5520 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:292:30: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  292 |                         RSA *rsa, int padding);
      |                         ~~~~~^~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘zif_openssl_public_encrypt’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5585:25: warning: ‘RSA_public_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5585 |                         successful = (RSA_public_encrypt((int)data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:282:5: note: declared here
  282 | int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5588:49: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5588 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5588:49: warning: passing argument 4 of ‘RSA_public_encrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5588 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:283:29: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  283 |                        RSA *rsa, int padding);
      |                        ~~~~~^~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c: In function ‘zif_openssl_public_decrypt’:
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5648:25: warning: ‘RSA_public_decrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5648 |                         cryptedlen = RSA_public_decrypt((int)data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:288:5: note: declared here
  288 | int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5651:41: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5651 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:45:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:5651:41: warning: passing argument 4 of ‘RSA_public_decrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5651 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:289:29: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  289 |                        RSA *rsa, int padding);
      |                        ~~~~~^~~
make: *** [Makefile:704: ext/openssl/openssl.lo] Error 1
make: *** Waiting for unfinished jobs....
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c: In function ‘php_select_crypto_method’:
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:952:17: warning: ‘TLSv1_client_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  952 |                 return is_client ? TLSv1_client_method() : TLSv1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2006:50: note: declared here
 2006 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_client_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:952:17: warning: ‘TLSv1_server_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  952 |                 return is_client ? TLSv1_client_method() : TLSv1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2005:50: note: declared here
 2005 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_server_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:955:17: warning: ‘TLSv1_1_client_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  955 |                 return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2014:50: note: declared here
 2014 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_1_client_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:955:17: warning: ‘TLSv1_1_server_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  955 |                 return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2013:50: note: declared here
 2013 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_1_server_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:963:17: warning: ‘TLSv1_2_client_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  963 |                 return is_client ? TLSv1_2_client_method() : TLSv1_2_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2022:50: note: declared here
 2022 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_2_client_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:963:17: warning: ‘TLSv1_2_server_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  963 |                 return is_client ? TLSv1_2_client_method() : TLSv1_2_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2021:50: note: declared here
 2021 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_2_server_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c: In function ‘set_server_dh_param’:
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:1182:9: warning: ‘PEM_read_bio_DHparams’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1182 |         dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
      |         ^~
In file included from /usr/include/openssl/ssl.h:36,
                 from /tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/pem.h:469:1: note: declared here
  469 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)
      | ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:1192:17: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1192 |                 DH_free(dh);
      |                 ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /usr/include/openssl/x509.h:37,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:1196:9: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1196 |         DH_free(dh);
      |         ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /usr/include/openssl/x509.h:37,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/7.1.33/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
allanlaal commented 2 years ago

phpenv install 5.6.40 also failed:

[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: Loaded zendopcache Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 5.6.40 into /home/allan/.phpenv/versions/5.6.40
[Downloading]: https://secure.php.net/distributions/php-5.6.40.tar.bz2
[Info]: Applying patches: /home/allan/.phpenv/plugins/php-build/bin/../share/php-build/patches/php-5.6-support-openssl-1.1.0.patch
[Preparing]: /tmp/php-build/source/5.6.40
[Compiling]: /tmp/php-build/source/5.6.40

-----------------
|  BUILD ERROR  |
-----------------

/tmp/php-build/source/5.6.40/ext/opcache/ZendAccelerator.c: In function ‘accel_use_shm_interned_strings’:
/tmp/php-build/source/5.6.40/ext/opcache/ZendAccelerator.c:397:35: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  397 |         CG(interned_empty_string) = accel_new_interned_string("", sizeof(""), 0 TSRMLS_CC);
      |                                   ^
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘add_assoc_name_entry’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:797:25: warning: ‘ASN1_STRING_data’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  797 |                         to_add = ASN1_STRING_data(str);
      |                         ^~~~~~
In file included from /usr/include/openssl/objects.h:21,
                 from /usr/include/openssl/evp.h:43,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:680:40: note: declared here
  680 | OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
      |                                        ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘asn1_time_to_time_t’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:850:9: warning: ‘ASN1_STRING_data’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  850 |         if (ASN1_STRING_length(timestr) != strlen((const char*)ASN1_STRING_data(timestr))) {
      |         ^~
In file included from /usr/include/openssl/objects.h:21,
                 from /usr/include/openssl/evp.h:43,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:680:40: note: declared here
  680 | OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
      |                                        ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:865:9: warning: ‘ASN1_STRING_data’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  865 |         strbuf = estrdup((char *)ASN1_STRING_data(timestr));
      |         ^~~~~~
In file included from /usr/include/openssl/objects.h:21,
                 from /usr/include/openssl/evp.h:43,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:680:40: note: declared here
  680 | OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
      |                                        ^~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/main/php.h:406,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:29:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zm_startup_openssl’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:1340:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
 1340 |         REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
      |                                                          ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/Zend/zend_constants.h:43:103: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
   43 | #define REGISTER_LONG_CONSTANT(name, lval, flags)  zend_register_long_constant((name), sizeof(name), (lval), (flags), module_number TSRMLS_CC)
      |                                                                                                       ^~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:1340:58: note: each undeclared identifier is reported only once for each function it appears in
 1340 |         REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
      |                                                          ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/Zend/zend_constants.h:43:103: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
   43 | #define REGISTER_LONG_CONSTANT(name, lval, flags)  zend_register_long_constant((name), sizeof(name), (lval), (flags), module_number TSRMLS_CC)
      |                                                                                                       ^~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_spki_export_challenge’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:1873:9: warning: ‘ASN1_STRING_data’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
 1873 |         RETVAL_STRING((char *) ASN1_STRING_data(spki->spkac->challenge), 1);
      |         ^~~~~~~~~~~~~
In file included from /usr/include/openssl/objects.h:21,
                 from /usr/include/openssl/evp.h:43,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:680:40: note: declared here
  680 | OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
      |                                        ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘openssl_x509v3_subjectAltName’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:2074:41: warning: ‘ASN1_STRING_data’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
 2074 |                                         BIO_write(bio, ASN1_STRING_data(as),
      |                                         ^~~~~~~~~
In file included from /usr/include/openssl/objects.h:21,
                 from /usr/include/openssl/evp.h:43,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:680:40: note: declared here
  680 | OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
      |                                        ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:2080:41: warning: ‘ASN1_STRING_data’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
 2080 |                                         BIO_write(bio, ASN1_STRING_data(as),
      |                                         ^~~~~~~~~
In file included from /usr/include/openssl/objects.h:21,
                 from /usr/include/openssl/evp.h:43,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:680:40: note: declared here
  680 | OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
      |                                        ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:2086:41: warning: ‘ASN1_STRING_data’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
 2086 |                                         BIO_write(bio, ASN1_STRING_data(as),
      |                                         ^~~~~~~~~
In file included from /usr/include/openssl/objects.h:21,
                 from /usr/include/openssl/evp.h:43,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:680:40: note: declared here
  680 | OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
      |                                        ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘php_openssl_generate_private_key’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3585:33: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3585 |                                 if (EVP_PKEY_assign_RSA(req->priv_key, RSA_generate_key(req->priv_key_bits, 0x10001, NULL, NULL))) {
      |                                 ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3585:33: warning: ‘RSA_generate_key’ is deprecated: Since OpenSSL 0.9.8 [-Wdeprecated-declarations]
 3585 |                                 if (EVP_PKEY_assign_RSA(req->priv_key, RSA_generate_key(req->priv_key_bits, 0x10001, NULL, NULL))) {
      |                                 ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:253:30: note: declared here
  253 | OSSL_DEPRECATEDIN_0_9_8 RSA *RSA_generate_key(int bits, unsigned long e, void
      |                              ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3593:41: warning: ‘DSA_generate_parameters’ is deprecated: Since OpenSSL 0.9.8 [-Wdeprecated-declarations]
 3593 |                                         DSA *dsapar = DSA_generate_parameters(req->priv_key_bits, NULL, 0, NULL, NULL, NULL, NULL);
      |                                         ^~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:159:6: note: declared here
  159 | DSA *DSA_generate_parameters(int bits, unsigned char *seed, int seed_len,
      |      ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3595:49: warning: ‘DSA_set_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3595 |                                                 DSA_set_method(dsapar, DSA_get_default_method());
      |                                                 ^~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:122:27: note: declared here
  122 | OSSL_DEPRECATEDIN_3_0 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
      |                           ^~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3595:49: warning: ‘DSA_get_default_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3595 |                                                 DSA_set_method(dsapar, DSA_get_default_method());
      |                                                 ^~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:121:41: note: declared here
  121 | OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_default_method(void);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3596:49: warning: ‘DSA_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3596 |                                                 if (DSA_generate_key(dsapar)) {
      |                                                 ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:174:27: note: declared here
  174 | OSSL_DEPRECATEDIN_3_0 int DSA_generate_key(DSA *a);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3597:57: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3597 |                                                         if (EVP_PKEY_assign_DSA(req->priv_key, dsapar)) {
      |                                                         ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3601:57: warning: ‘DSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3601 |                                                         DSA_free(dsapar);
      |                                                         ^~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:127:28: note: declared here
  127 | OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3611:41: warning: ‘DH_generate_parameters’ is deprecated: Since OpenSSL 0.9.8 [-Wdeprecated-declarations]
 3611 |                                         DH *dhpar = DH_generate_parameters(req->priv_key_bits, 2, NULL, NULL);
      |                                         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:318:29: note: declared here
  318 | OSSL_DEPRECATEDIN_0_9_8 DH *DH_generate_parameters(int prime_len, int generator,
      |                             ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3615:49: warning: ‘DH_set_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3615 |                                                 DH_set_method(dhpar, DH_get_default_method());
      |                                                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:196:27: note: declared here
  196 | OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth);
      |                           ^~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3615:49: warning: ‘DH_get_default_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3615 |                                                 DH_set_method(dhpar, DH_get_default_method());
      |                                                 ^~~~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:195:40: note: declared here
  195 | OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_get_default_method(void);
      |                                        ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3616:49: warning: ‘DH_check’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3616 |                                                 if (DH_check(dhpar, &codes) && codes == 0 && DH_generate_key(dhpar)) {
      |                                                 ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:220:27: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 int DH_check(const DH *dh, int *codes);
      |                           ^~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3616:49: warning: ‘DH_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3616 |                                                 if (DH_check(dhpar, &codes) && codes == 0 && DH_generate_key(dhpar)) {
      |                                                 ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:223:27: note: declared here
  223 | OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
      |                           ^~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3617:57: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3617 |                                                         if (EVP_PKEY_assign_DH(req->priv_key, dhpar)) {
      |                                                         ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3621:57: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3621 |                                                         DH_free(dhpar);
      |                                                         ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘php_openssl_is_private_key’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3655:33: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3655 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3655:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 3655 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3659:41: warning: ‘RSA_get0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3659 |                                         RSA_get0_factors(rsa, &p, &q);
      |                                         ^~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:220:28: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_factors(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3674:33: warning: ‘EVP_PKEY_get0_DSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3674 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1355:22: note: declared here
 1355 | const struct dsa_st *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3674:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 3674 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3678:41: warning: ‘DSA_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3678 |                                         DSA_get0_pqg(dsa, &p, &q, &g);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3683:41: warning: ‘DSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3683 |                                         DSA_get0_key(dsa, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:204:28: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3694:33: warning: ‘EVP_PKEY_get0_DH’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3694 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                 ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1363:43: note: declared here
 1363 | OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
      |                                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3694:42: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 3694 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                          ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3698:41: warning: ‘DH_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3698 |                                         DH_get0_pqg(dh, &p, &q, &g);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:253:28: note: declared here
  253 | OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3703:41: warning: ‘DH_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3703 |                                         DH_get0_key(dh, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:256:28: note: declared here
  256 | OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3714:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3714 |                                 EC_KEY *ec = EVP_PKEY_get0_EC_KEY(pkey);
      |                                 ^~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3714:46: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 3714 |                                 EC_KEY *ec = EVP_PKEY_get0_EC_KEY(pkey);
      |                                              ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3715:33: warning: ‘EC_KEY_get0_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3715 |                                 if (ec != NULL && NULL == EC_KEY_get0_private_key(ec)) {
      |                                 ^~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:51:
/usr/include/openssl/ec.h:1048:37: note: declared here
 1048 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_and_assign_rsa’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3761:9: warning: ‘RSA_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3761 |         if (!n || !d || !RSA_set0_key(rsa, n, e, d)) {
      |         ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:207:27: note: declared here
  207 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
      |                           ^~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3767:9: warning: ‘RSA_set0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3767 |         if ((p || q) && !RSA_set0_factors(rsa, p, q)) {
      |         ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:208:27: note: declared here
  208 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3774:9: warning: ‘RSA_set0_crt_params’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3774 |         if ((dmp1 || dmq1 || iqmp) && !RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp)) {
      |         ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:209:27: note: declared here
  209 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_crt_params(RSA *r,
      |                           ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3778:9: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3778 |         if (!EVP_PKEY_assign_RSA(pkey, rsa)) {
      |         ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dsa’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3795:9: warning: ‘DSA_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3795 |         if (!p || !q || !g || !DSA_set0_pqg(dsa, p, q, g)) {
      |         ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:203:27: note: declared here
  203 | OSSL_DEPRECATEDIN_3_0 int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
      |                           ^~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3802:17: warning: ‘DSA_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3802 |                 return DSA_set0_key(dsa, pub_key, priv_key);
      |                 ^~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:206:27: note: declared here
  206 | OSSL_DEPRECATEDIN_3_0 int DSA_set0_key(DSA *d, BIGNUM *pub_key,
      |                           ^~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3805:9: warning: ‘DSA_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3805 |         if (!DSA_generate_key(dsa)) {
      |         ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:174:27: note: declared here
  174 | OSSL_DEPRECATEDIN_3_0 int DSA_generate_key(DSA *a);
      |                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3810:9: warning: ‘DSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3810 |         DSA_get0_key(dsa, &pub_key_const, &priv_key_const);
      |         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:204:28: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dh’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3864:9: warning: ‘DH_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3864 |         if (!p || !g || !DH_set0_pqg(dh, p, q, g)) {
      |         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:255:27: note: declared here
  255 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
      |                           ^~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3871:17: warning: ‘DH_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3871 |                 return DH_set0_key(dh, pub_key, priv_key);
      |                 ^~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:258:27: note: declared here
  258 | OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
      |                           ^~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3878:17: warning: ‘DH_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3878 |                 return DH_set0_key(dh, pub_key, priv_key);
      |                 ^~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:258:27: note: declared here
  258 | OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
      |                           ^~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3881:9: warning: ‘DH_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3881 |         if (!DH_generate_key(dh)) {
      |         ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:223:27: note: declared here
  223 | OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
      |                           ^~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_new’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3909:33: warning: ‘RSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3909 |                                 RSA *rsa = RSA_new();
      |                                 ^~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void);
      |                            ^~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3914:41: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3914 |                                         RSA_free(rsa);
      |                                         ^~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3923:33: warning: ‘DSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3923 |                                 DSA *dsa = DSA_new();
      |                                 ^~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:125:28: note: declared here
  125 | OSSL_DEPRECATEDIN_3_0 DSA *DSA_new(void);
      |                            ^~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3926:49: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3926 |                                                 if (EVP_PKEY_assign_DSA(pkey, dsa)) {
      |                                                 ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3930:41: warning: ‘DSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3930 |                                         DSA_free(dsa);
      |                                         ^~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:127:28: note: declared here
  127 | OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3939:33: warning: ‘DH_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3939 |                                 DH *dh = DH_new();
      |                                 ^~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:199:27: note: declared here
  199 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
      |                           ^~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3942:49: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3942 |                                                 if (EVP_PKEY_assign_DH(pkey, dh)) {
      |                                                 ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1328:5: note: declared here
 1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
      |     ^~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:3946:41: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3946 |                                         DH_free(dh);
      |                                         ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_export_to_file’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4019:33: warning: ‘PEM_write_bio_ECPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4019 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get0_EC_KEY(key), cipher, (unsigned char *)passphrase, passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:54:
/usr/include/openssl/pem.h:462:1: note: declared here
  462 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, ECPrivateKey, EC_KEY)
      | ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4019:33: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4019 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get0_EC_KEY(key), cipher, (unsigned char *)passphrase, passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_export’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4088:33: warning: ‘PEM_write_bio_ECPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4088 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get1_EC_KEY(key), cipher, (unsigned char *)passphrase, passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:54:
/usr/include/openssl/pem.h:462:1: note: declared here
  462 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, ECPrivateKey, EC_KEY)
      | ^~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4088:33: warning: ‘EVP_PKEY_get1_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4088 |                                 pem_write = PEM_write_bio_ECPrivateKey(bio_out, EVP_PKEY_get1_EC_KEY(key), cipher, (unsigned char *)passphrase, passphrase_len, NULL, NULL);
      |                                 ^~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1374:19: note: declared here
 1374 | struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
      |                   ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_get_details’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4210:33: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4210 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4210:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4210 |                                 RSA *rsa = EVP_PKEY_get0_RSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4217:41: warning: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4217 |                                         RSA_get0_key(rsa, &n, &e, &d);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:217:28: note: declared here
  217 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4218:41: warning: ‘RSA_get0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4218 |                                         RSA_get0_factors(rsa, &p, &q);
      |                                         ^~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:220:28: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_factors(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4219:41: warning: ‘RSA_get0_crt_params’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4219 |                                         RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp);
      |                                         ^~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:225:28: note: declared here
  225 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_crt_params(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4241:33: warning: ‘EVP_PKEY_get0_DSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4241 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                 ^~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1355:22: note: declared here
 1355 | const struct dsa_st *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4241:44: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4241 |                                 DSA *dsa = EVP_PKEY_get0_DSA(pkey);
      |                                            ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4248:41: warning: ‘DSA_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4248 |                                         DSA_get0_pqg(dsa, &p, &q, &g);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4249:41: warning: ‘DSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4249 |                                         DSA_get0_key(dsa, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dsa.h:204:28: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4264:33: warning: ‘EVP_PKEY_get0_DH’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4264 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                 ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1363:43: note: declared here
 1363 | OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
      |                                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4264:42: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4264 |                                 DH *dh = EVP_PKEY_get0_DH(pkey);
      |                                          ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4271:41: warning: ‘DH_get0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4271 |                                         DH_get0_pqg(dh, &p, &q, &g);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:253:28: note: declared here
  253 | OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4272:41: warning: ‘DH_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4272 |                                         DH_get0_key(dh, &pub_key, &priv_key);
      |                                         ^~~~~~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:256:28: note: declared here
  256 | OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
      |                            ^~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4288:25: warning: ‘EVP_PKEY_get0_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4288 |                         if (EVP_PKEY_get0_EC_KEY(pkey) != NULL) {
      |                         ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1372:25: note: declared here
 1372 | const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
      |                         ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4297:33: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4297 |                                 ec_group = EC_KEY_get0_group(EVP_PKEY_get1_EC_KEY(pkey));
      |                                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:51:
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4297:33: warning: ‘EVP_PKEY_get1_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4297 |                                 ec_group = EC_KEY_get0_group(EVP_PKEY_get1_EC_KEY(pkey));
      |                                 ^~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1374:19: note: declared here
 1374 | struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
      |                   ^~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_private_encrypt’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4848:25: warning: ‘RSA_private_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4848 |                         successful =  (RSA_private_encrypt(data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:285:5: note: declared here
  285 | int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4851:49: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4851 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4851:49: warning: passing argument 4 of ‘RSA_private_encrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4851 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:286:30: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  286 |                         RSA *rsa, int padding);
      |                         ~~~~~^~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_private_decrypt’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4906:25: warning: ‘RSA_private_decrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4906 |                         cryptedlen = RSA_private_decrypt(data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:291:5: note: declared here
  291 | int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4909:41: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4909 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4909:41: warning: passing argument 4 of ‘RSA_private_decrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4909 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:292:30: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  292 |                         RSA *rsa, int padding);
      |                         ~~~~~^~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_public_encrypt’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4971:25: warning: ‘RSA_public_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4971 |                         successful = (RSA_public_encrypt(data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:282:5: note: declared here
  282 | int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4974:49: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 4974 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:4974:49: warning: passing argument 4 of ‘RSA_public_encrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 4974 |                                                 EVP_PKEY_get0_RSA(pkey),
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:283:29: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  283 |                        RSA *rsa, int padding);
      |                        ~~~~~^~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_public_decrypt’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:5030:25: warning: ‘RSA_public_decrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5030 |                         cryptedlen = RSA_public_decrypt(data_len,
      |                         ^~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:288:5: note: declared here
  288 | int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
      |     ^~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:5033:41: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5033 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1346:22: note: declared here
 1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:5033:41: warning: passing argument 4 of ‘RSA_public_decrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5033 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:47:
/usr/include/openssl/rsa.h:289:29: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  289 |                        RSA *rsa, int padding);
      |                        ~~~~~^~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_dh_compute_key’:
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:5760:9: warning: ‘EVP_PKEY_get0_DH’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5760 |         dh = EVP_PKEY_get0_DH(pkey);
      |         ^~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1363:43: note: declared here
 1363 | OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
      |                                           ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:5760:12: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5760 |         dh = EVP_PKEY_get0_DH(pkey);
      |            ^
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:5767:9: warning: ‘DH_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5767 |         data = emalloc(DH_size(dh) + 1);
      |         ^~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:203:27: note: declared here
  203 | OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh);
      |                           ^~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:5768:9: warning: ‘DH_compute_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 5768 |         len = DH_compute_key((unsigned char*)data, pub, dh);
      |         ^~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /tmp/php-build/source/5.6.40/ext/openssl/openssl.c:48:
/usr/include/openssl/dh.h:224:27: note: declared here
  224 | OSSL_DEPRECATEDIN_3_0 int DH_compute_key(unsigned char *key,
      |                           ^~~~~~~~~~~~~~
make: *** [Makefile:682: ext/openssl/openssl.lo] Error 1
make: *** Waiting for unfinished jobs....
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c: In function ‘php_select_crypto_method’:
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:954:17: warning: ‘TLSv1_client_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  954 |                 return is_client ? TLSv1_client_method() : TLSv1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2006:50: note: declared here
 2006 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_client_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:954:17: warning: ‘TLSv1_server_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  954 |                 return is_client ? TLSv1_client_method() : TLSv1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2005:50: note: declared here
 2005 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_server_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:957:17: warning: ‘TLSv1_1_client_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  957 |                 return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2014:50: note: declared here
 2014 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_1_client_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:957:17: warning: ‘TLSv1_1_server_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  957 |                 return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2013:50: note: declared here
 2013 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_1_server_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:965:17: warning: ‘TLSv1_2_client_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  965 |                 return is_client ? TLSv1_2_client_method() : TLSv1_2_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2022:50: note: declared here
 2022 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_2_client_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:965:17: warning: ‘TLSv1_2_server_method’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
  965 |                 return is_client ? TLSv1_2_client_method() : TLSv1_2_server_method();
      |                 ^~~~~~
In file included from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ssl.h:2021:50: note: declared here
 2021 | OSSL_DEPRECATEDIN_1_1_0 __owur const SSL_METHOD *TLSv1_2_server_method(void);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c: In function ‘set_server_rsa_key’:
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:1145:9: warning: ‘RSA_generate_key’ is deprecated: Since OpenSSL 0.9.8 [-Wdeprecated-declarations]
 1145 |         rsa = RSA_generate_key(rsa_key_size, RSA_F4, NULL, NULL);
      |         ^~~
In file included from /usr/include/openssl/x509.h:36,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/rsa.h:253:30: note: declared here
  253 | OSSL_DEPRECATEDIN_0_9_8 RSA *RSA_generate_key(int bits, unsigned long e, void
      |                              ^~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:1149:17: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1149 |                 RSA_free(rsa);
      |                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:1153:9: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1153 |         RSA_free(rsa);
      |         ^~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c: In function ‘set_server_dh_param’:
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:1171:9: warning: ‘PEM_read_bio_DHparams’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1171 |         dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
      |         ^~
In file included from /usr/include/openssl/ssl.h:36,
                 from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/pem.h:469:1: note: declared here
  469 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)
      | ^~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:1181:17: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1181 |                 DH_free(dh);
      |                 ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /usr/include/openssl/x509.h:37,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:1185:9: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1185 |         DH_free(dh);
      |         ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /usr/include/openssl/x509.h:37,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c: In function ‘set_server_ecdh_curve’:
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:1211:9: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1211 |         ecdh = EC_KEY_new_by_curve_name(curve_nid);
      |         ^~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ec.h:998:31: note: declared here
  998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:1220:9: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1220 |         EC_KEY_free(ecdh);
      |         ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/5.6.40/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
allanlaal commented 2 years ago

all of them seem to fail because of the same error:

/tmp/php-build.5.6.40.20220518205612.log:/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:1340:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.5.6.40.20220518233715.log:/tmp/php-build/source/5.6.40/ext/openssl/openssl.c:1340:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.7.1.32.20220518232859.log:/tmp/php-build/source/7.1.32/ext/openssl/openssl.c:1474:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.7.1.33.20220518201747.log:/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:1474:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.7.1.33.20220518210422.log:/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:1474:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.7.1.33.20220518230304.log:/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:1474:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.7.1.33.20220518230602.log:/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:1474:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.7.1.33.20220518231419.log:/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:1474:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.7.1.33.20220518232717.log:/tmp/php-build/source/7.1.33/ext/openssl/openssl.c:1474:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.7.1snapshot.20220518215034.log:/tmp/php-build/source/7.1snapshot/ext/openssl/openssl.c:1474:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.7.4.29.20220518210707.log:/tmp/php-build/source/7.4.29/ext/openssl/openssl.c:1520:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.7.4.29.20220518213647.log:/tmp/php-build/source/7.4.29/ext/openssl/openssl.c:1520:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.8.0.19.20220518220803.log:/tmp/php-build/source/8.0.19/ext/openssl/openssl.c:1224:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
/tmp/php-build.8.0.19.20220518221137.log:/tmp/php-build/source/8.0.19/ext/openssl/openssl.c:1224:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
madumlao commented 2 years ago

I'm also running into this issue, a temporary "hack" I'm looking into trying would be to install a local copy of OpenSSL 1.x libs in your userdir and set then openssl libdir (i think it's --with-ssl=foo) options to point to it.

allanlaal commented 2 years ago

I used the https://github.com/php-build/php-build/blob/master/build-openssl-1.0.sh script to install OpenSSL 1 and then also tried with --with-ssl=/path/to/openssl1/lib64 etc, but still failed

nicolasleborgne commented 2 years ago

It seems that the --with-openssl flag does not provide the ability to specify openssl path. Not sure if it is the right answer, but a working solution for me is to add an entry in the PKG_CONFIG_PATH pointing to the openssl version installed via ~/.phpenv/plugins/php-build/build-openssl-1.0.sh :

PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.0/lib/pkgconfig" phpenv install 8.0.17

According to these tests: https://github.com/nicolasleborgne/php-build/runs/6644800527?check_suite_focus=true it seems that Openssl is not the only problem on Ubuntu 22.04 for building Php versions. Since all the supported versions are OK, I do not think I will spend more time on this.

luksak commented 1 year ago

On Fedora 37 this fails for me after running ~/.phpenv/plugins/php-build/build-openssl-1.0.sh:

$ PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.0/lib/pkgconfig" phpenv install 7.4.33 
[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: Loaded zendopcache Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 7.4.33 into /home/USER/.phpenv/versions/7.4.33
[Skipping]: Already downloaded and extracted https://secure.php.net/distributions/php-7.4.33.tar.bz2
[Preparing]: /tmp/php-build/source/7.4.33

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
configure: error: GD build test failed. Please check the config.log for details.
-----------------------------------------

The full Log is available at '/tmp/php-build.7.4.33.20221205132330.log'.
[Warn]: Aborting build.
miracle777 commented 1 year ago

I, too, am having trouble with the same error.

PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/bin/openssl@3.0.2/lib/pkgconfig" phpenv install 7.2.34
[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: Loaded zendopcache Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 7.2.34 into /home/masaru/.phpenv/versions/7.2.34
[Skipping]: Already downloaded and extracted https://secure.php.net/distributions/php-7.2.34.tar.bz2
[Preparing]: /tmp/php-build/source/7.2.34

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
configure: WARNING: unrecognized options: --with-mcrypt
configure: error: Cannot find OpenSSL's <evp.h>
-----------------------------------------

The full Log is available at '/tmp/php-build.7.2.34.20230112111822.log'.
[Warn]: Aborting build.

openssl version -a
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
built on: Thu Oct 27 17:06:56 2022 UTC
platform: debian-amd64
options:  bn(64,64)
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -ffile-prefix-map=/build/openssl-WsPfAX/openssl-3.0.2=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_TLS_SECURITY_LEVEL=2 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
OPENSSLDIR: "/usr/lib/ssl"
ENGINESDIR: "/usr/lib/x86_64-linux-gnu/engines-3"
MODULESDIR: "/usr/lib/x86_64-linux-gnu/ossl-modules"
Seeding source: os-specific
CPUINFO: OPENSSL_ia32cap=0xc2da2203478bffff:0x842509

Has the fact that OpenSSl has been updated to address the vulnerability had any impact? Because PHP 8.1.0 was installed successfully.

mzch commented 1 year ago

@miracle777 --with-mcrypt flag has been removed since PHP 7.2. Use PECL.

miracle777 commented 1 year ago

Thank you very much. I searched the net for "PECL" and found the following article. However, I got the following error Ubuntu 22.04 has only OpenSSL version 3, and there seems to be ruby as well as PHP as a programming language that older versions can no longer be built.

Could this be an effect of the measures taken to address the OpenSSL vulnerability? I think so. It might be good if we could download and install the old OpenSSL. I do not know how to do this and would appreciate it if you could let me know.

https://itsubuntu.com/install-php-mcrypt-extension-on-ubuntu-22-04/

pecl update-channels
Updating channel "doc.php.net"
could not create lock file
Updating channel "pear.php.net"
could not create lock file
Updating channel "pecl.php.net"
could not create lock file

 phpenv install 7.2.34
[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: Loaded zendopcache Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 7.2.34 into /home/masaru/.phpenv/versions/7.2.34
[Skipping]: Already downloaded and extracted https://secure.php.net/distributions/php-7.2.34.tar.bz2
[Preparing]: /tmp/php-build/source/7.2.34
[Compiling]: /tmp/php-build/source/7.2.34

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
/tmp/php-build/source/7.2.34/ext/openssl/xp_ssl.c:1215:9: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1215 |         DH_free(dh);
      |         ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /usr/include/openssl/x509.h:37,
                 from /usr/include/openssl/ssl.h:31,
                 from /tmp/php-build/source/7.2.34/ext/openssl/xp_ssl.c:34:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
-----------------------------------------

The full Log is available at '/tmp/php-build.7.2.34.20230112155630.log'.
[Warn]: Aborting build.
miracle777 commented 1 year ago

I found the following article. I would like to install and try OpenSSL version 1.1.1 based on this.

https://zenn.dev/zunda/scraps/327d99f850a8ad

mzch commented 1 year ago

Yes. You need to install OpenSSL 1.1.1 and --with-openssl=/path/to/openssl build option.

miracle777 commented 1 year ago

Thanks for letting us know. I will give it a try.

miracle777 commented 1 year ago

Thank you very much. I looked up how to install OpenSSL on Nec and did it. But I get the following error. Is there something wrong with the way I wrote the command?

The referenced article is here. https://stackoverflow.com/questions/74988278/how-to-compile-php-7-4-33-correctly-with-openssl-1-1-1-on-ubuntu-22-04

PHP_BUILD_CONFIGURE_OPTS="--with-bz2 --with-openssl=/home/***/openssl-1.1.1s/opt/build --with-iconv --with-tidy --with-external-pcre --with-sodium --with-zip --enable-intl --with-pdo-pgsql --with-pear"

PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j$(grep processor /proc/cpuinfo | wc -l)" phpenv install --ini development 7.3.29

[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: Loaded zendopcache Plugin.
[Info]: php.ini-development gets used as php.ini
[Info]: Building 7.3.29 into /home/masaru/.phpenv/versions/7.3.29
[Skipping]: Already downloaded and extracted https://secure.php.net/distributions/php-7.3.29.tar.bz2
[Preparing]: /tmp/php-build/source/7.3.29
[Compiling]: /tmp/php-build/source/7.3.29

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
      |                      ^~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.3.29/ext/openssl/openssl.c:5876:41: warning: passing argument 4 of ‘RSA_public_decrypt’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5876 |                                         EVP_PKEY_get0_RSA(pkey),
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/php-build/source/7.3.29/ext/openssl/openssl.c:45:
/usr/include/openssl/rsa.h:289:29: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but argument is of type ‘const struct rsa_st *’
  289 |                        RSA *rsa, int padding);
      |                        ~~~~~^~~
make: *** [Makefile:704: ext/openssl/openssl.lo] エラー 1
make: *** 未完了のジョブを待っています....
-----------------------------------------

The full Log is available at '/tmp/php-build.7.3.29.20230113143633.log'.
[Warn]: Aborting build.
miracle777 commented 1 year ago

Thank you for all the information you have given me. I installed PHP7.4.3 on ubuntu20.04 because I cannot install PHP7 series on Ubuntu22.04. And I was able to use EC-CUBE. I think it is better to think that PHP7 series cannot be used in Ubuntu22.04.

usersina commented 1 year ago

Note: Do not run the commands until you read to the end.

Apparently, I was required to install openssl > 1.0.1 which I did. I created a new build-openssl-1.1.1.sh and run it. After that, I ran

PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1.1/lib/pkgconfig" phpenv install 8.2.1

And a new error appeared, something about sqlite3 not installed! (Even though it is! It's looking for a dev version looks like). But sure, let's install it with sudo apt install libsqlite3-dev and re-run the install command!

Did it work? Nope, something about libpng not being installed... Feel free to continue from here on, I don't feel too invested to fix this any further.

build-openssl-1.1.1.sh ```bash #!/bin/sh # # PHP 5.6 and older require OpenSSL 1.0.2, which is too old for most modern # operating systems. This script downloads, builds and installs OpenSSL 1.0.2 # for use in PHP builds. # set -ex BUILD_DIR=/tmp/openssl-1.1.1-build TARBALL=openssl-1.1.1o.tar.gz MD5SUM=d05e96e200d2ff0aef20c114cb5f17bf PREFIX=/usr/local/opt/openssl@1.1.1 if command -v sudo ; then SUDO=sudo else SUDO= fi mkdir -p "$BUILD_DIR" cd "$BUILD_DIR" curl -OLs https://www.openssl.org/source/$TARBALL if command -v md5sum; then echo "$MD5SUM $TARBALL" | md5sum -c fi tar xzf $TARBALL --strip-components=1 -C "$BUILD_DIR" CONFIG_SCRIPT=./config ARCH_ARGS="" if [ "$(uname -s)" = Darwin ] && [ "$(uname -m)" = x86_64 ]; then ARCH_ARGS="darwin64-x86_64-cc enable-ec_nistp_64_gcc_128" CONFIG_SCRIPT=./Configure fi $CONFIG_SCRIPT -fPIC shared no-ssl2 no-ssl3 no-zlib $ARCH_ARGS --prefix=/usr/local/opt/openssl@1.1.1 make depend make -j $(nproc) $SUDO make install_sw # if this multiarch system uses lib64, create a symlink for it # this will ensure that PHP configure script will succeed with any # combination of --with-openssl and --with-libdir if [ -d /usr/lib64 ]; then $SUDO ln -s "$PREFIX/lib" "$PREFIX/lib64" fi rm -rf "$BUILD_DIR" ```
romabysen commented 1 year ago

As someone who suffered doing this recently here's how to do it without modifying the php-build sources. This is for PHP 7.4.30. Build openssl 1.1.1i from source and install it in, say, /usr/local/openssl:

./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
make
sudo make install

Make sure pkgconfig and all your PHP requirements are installed (bzip2, libpng-dev etc). Export PHP_BUILD_CONFIGURE_OPTS:

export PHP_BUILD_CONFIGURE_OPTS="PKG_CONFIG_PATH=/usr/local/openssl/lib/pkgconfig"

Install with phpenv:

phpenv install 7.4.30

Installation will complete without errors.

sun commented 1 year ago

I was facing the same error with Homebrew. The following steps resolved it, combining ideas from here and here:

  1. Edit the formulae
    brew edit php@7.4
  2. Comment out or remove the date-based validation line, so that you can use the formula at all:
    disable! date: "2022-11-28", because: :versioned_formula
  3. Add the following lines after the block relating to "pkg-config" to make pkg-config find the compile headers of openssl v1.1.1 before the ones of v3 (which do not define RSA_SSLV23_PADDING):
    ENV["PKG_CONFIG_PATH"] = "#{Formula["openssl@1.1"].opt_prefix}/lib/pkgconfig:#{ENV["PKG_CONFIG_PATH"]}"
    system "echo", ENV["PKG_CONFIG_PATH"]
  4. Add OpenSSL flags directly afterwards:
    ENV["OPENSSL_CFLAGS"] = "-I#{Formula["openssl@1.1"].opt_include}"
    ENV["OPENSSL_LIBS"] = "-L#{Formula["openssl@1.1"].opt_prefix}/lib -lcrypto -lssl"
  5. In the args array for configure, replace --with-openssl with the following:
    --with-openssl=shared,#{Formula["openssl@1.1"].opt_prefix}
  6. Save and exit
  7. Reinstall PHP 7.4 from source using the locally edited formulae:
    HOMEBREW_NO_INSTALL_FROM_API=1 brew reinstall -s php@7.4
ildar-aim commented 11 months ago

I used this patch

src/php-8.0.30/ext/openssl

--- openssl.c   2023-10-16 13:02:29.598429217 +0400
+++ openssl.c   2023-10-16 13:04:08.056353322 +0400
@@ -1325,7 +1325,7 @@
    REGISTER_LONG_CONSTANT("OPENSSL_CMS_NOSIGS", CMS_NOSIGS, CONST_CS|CONST_PERSISTENT);

    REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_PADDING", RSA_PKCS1_PADDING, CONST_CS|CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
+//     REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT); // https://github.com/php-build/php-build/issues/718#issuecomment-1764063347
    REGISTER_LONG_CONSTANT("OPENSSL_NO_PADDING", RSA_NO_PADDING, CONST_CS|CONST_PERSISTENT);
    REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_OAEP_PADDING", RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT);

before

make
make install

to compile PHP 8.0.30 from source with openssl 3.1.3

fabiang commented 10 months ago

@ildar-aim is on the correct path. Instead of compiling OpenSSL 1.1.x we can patch the openssl.c. With this patch applied I was able to build PHP 8.0.30, 7.4.33 and 7.3.33.

PHP previous had a check for the constant OPENSSL_SSLV23_PADDING, but this was reverted: https://github.com/php/php-src/commit/5f90134bb69a345c7edb5013e6461e84caa32dbc?diff=unified

PR soon follows.

fabiang commented 10 months ago

Since #758 was merged this issue should be resolved now:

jenkins@5a0dc93d44df:/$ phpenv versions
* 7.4 (set by /home/jenkins/.phpenv/version)
  7.4.33
  8.0
  8.0.30
  8.1
  8.1.25
  8.2
  8.2.12

jenkins@5a0dc93d44df:/$ phpenv global 8.0

jenkins@5a0dc93d44df:/$ php -v
PHP 8.0.30 (cli) (built: Nov 14 2023 14:53:34) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.30, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.30, Copyright (c), by Zend Technologies
    with Xdebug v3.2.2, Copyright (c) 2002-2023, by Derick Rethans

jenkins@5a0dc93d44df:/$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

jenkins@5a0dc93d44df:/$ php -i | grep "SSL Version"
SSL Version => OpenSSL/3.0.2