SSL 3.0 : deprecation notices

ssl 3 is now default in archlinux. I am getting these deprecation notices:

[16/22] Building C object packages/ssl/CMakeFiles/plugin_crypto4pl.dir/crypto4pl.c.o
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘free_crypto_hash_context’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:168:3: warning: ‘HMAC_CTX_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  168 |   HMAC_CTX_free(c->mac_ctx);
      |   ^~~~~~~~~~~~~
In file included from /tmp/swipl-devel/packages/ssl/crypto4pl.c:40:
/usr/include/openssl/hmac.h:35:28: note: declared here
   35 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx);
      |                            ^~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_crypto_hash_context_new’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:401:3: warning: ‘HMAC_CTX_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  401 |   { context->mac_ctx = HMAC_CTX_new();
      |   ^
/usr/include/openssl/hmac.h:33:33: note: declared here
   33 | OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void);
      |                                 ^~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:402:5: warning: ‘HMAC_Init_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  402 |     if ( !HMAC_Init_ex(context->mac_ctx,
      |     ^~
/usr/include/openssl/hmac.h:43:27: note: declared here
   43 | OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
      |                           ^~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:405:5: warning: ‘HMAC_CTX_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  405 |     { HMAC_CTX_free(context->mac_ctx);
      |     ^
/usr/include/openssl/hmac.h:35:28: note: declared here
   35 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx);
      |                            ^~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_crypto_hash_context_copy’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:458:3: warning: ‘HMAC_CTX_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  458 |   out->mac_ctx = in->mac_ctx ? HMAC_CTX_new() : NULL;
      |   ^~~
/usr/include/openssl/hmac.h:33:33: note: declared here
   33 | OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void);
      |                                 ^~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:461:3: warning: ‘HMAC_Init_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  461 |   { if ( !HMAC_Init_ex(out->mac_ctx,
      |   ^
/usr/include/openssl/hmac.h:43:27: note: declared here
   43 | OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
      |                           ^~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:464:5: warning: ‘HMAC_CTX_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  464 |     { HMAC_CTX_free(out->mac_ctx);
      |     ^
/usr/include/openssl/hmac.h:35:28: note: declared here
   35 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx);
      |                            ^~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:467:5: warning: ‘HMAC_CTX_copy’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  467 |     rc = HMAC_CTX_copy(out->mac_ctx, in->mac_ctx);
      |     ^~
/usr/include/openssl/hmac.h:49:34: note: declared here
   49 | OSSL_DEPRECATEDIN_3_0 __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
      |                                  ^~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘hash_append’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:485:5: warning: ‘HMAC_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  485 |     return HMAC_Update(context->mac_ctx, data, size);
      |     ^~~~~~
/usr/include/openssl/hmac.h:45:27: note: declared here
   45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
      |                           ^~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_crypto_hash_context_hash’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:526:5: warning: ‘HMAC_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  526 |     HMAC_Final(context->mac_ctx, digest, &ulen);
      |     ^~~~~~~~~~
/usr/include/openssl/hmac.h:47:27: note: declared here
   47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
      |                           ^~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘recover_ec’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:809:10: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  809 |          (key = EC_KEY_new_by_curve_name(OBJ_sn2nid(curve)))
      |          ^
In file included from /usr/include/openssl/x509.h:33,
                 from /tmp/swipl-devel/packages/ssl/cryptolib.h:41,
                 from /tmp/swipl-devel/packages/ssl/cryptolib.c:38,
                 from /tmp/swipl-devel/packages/ssl/crypto4pl.c:51:
/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/swipl-devel/packages/ssl/crypto4pl.c:819:5: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  819 |     EC_KEY_free(key);
      |     ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:829:5: warning: ‘EC_KEY_set_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  829 |     EC_KEY_set_private_key(key, privkey);
      |     ^~~~~~~~~~~~~~~~~~~~~~
/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/swipl-devel/packages/ssl/crypto4pl.c:840:8: warning: ‘o2i_ECPublicKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  840 |        (key = o2i_ECPublicKey(&key, (const unsigned char**) &codes, codes_len))
      |        ^
/usr/include/openssl/ec.h:1236:31: note: declared here
 1236 | OSSL_DEPRECATEDIN_3_0 EC_KEY *o2i_ECPublicKey(EC_KEY **key,
      |                               ^~~~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:850:3: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  850 |   EC_KEY_free(key);
      |   ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘recover_rsa’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:863:3: warning: ‘RSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  863 |   RSAKEY *key = RSA_new();
      |   ^~~~~~
In file included from /tmp/swipl-devel/packages/ssl/cryptolib.h:39:
/usr/include/openssl/rsa.h:201:28: note: declared here
  201 | OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void);
      |                            ^~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:932:5: warning: ‘RSA_set0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  932 |     if ( !RSA_set0_key(key, n, e, d) ||
      |     ^~
/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/swipl-devel/packages/ssl/crypto4pl.c:933:10: warning: ‘RSA_set0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  933 |          ( (p || q) && !RSA_set0_factors(key, p, q) ) ||
      |          ^
/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/swipl-devel/packages/ssl/crypto4pl.c:935:12: warning: ‘RSA_set0_crt_params’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  935 |            !RSA_set0_crt_params(key, dmp1, dmq1, iqmp)) )
      |            ^
/usr/include/openssl/rsa.h:209:27: note: declared here
  209 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_crt_params(RSA *r,
      |                           ^~~~~~~~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:936:5: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  936 |     { RSA_free(key);
      |     ^
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:947:3: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  947 |   RSA_free(key);
      |   ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_ecdsa_sign’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1098:3: warning: ‘ECDSA_do_sign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1098 |   sig = ECDSA_do_sign(data, (unsigned int)data_len, key);
      |   ^~~
/usr/include/openssl/ec.h:1365:34: note: declared here
 1365 | OSSL_DEPRECATEDIN_3_0 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst,
      |                                  ^~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1099:3: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1099 |   EC_KEY_free(key);
      |   ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_ecdsa_verify’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1145:3: warning: ‘ECDSA_do_verify’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1145 |   rc = ECDSA_do_verify(data, data_len, sig, key);
      |   ^~
/usr/include/openssl/ec.h:1391:27: note: declared here
 1391 | OSSL_DEPRECATEDIN_3_0 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
      |                           ^~~~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1147:3: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1147 |   EC_KEY_free(key);
      |   ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_rsa_private_decrypt’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1194:3: warning: ‘RSA_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1194 |   outsize = RSA_size(key);
      |   ^~~~~~~
/usr/include/openssl/rsa.h:204:27: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
      |                           ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1221:3: warning: ‘RSA_private_decrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1221 |   if ((outsize = RSA_private_decrypt((int)cipher_length, cipher,
      |   ^~
/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/swipl-devel/packages/ssl/crypto4pl.c:1224:5: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1224 |     RSA_free(key);
      |     ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1234:3: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1234 |   RSA_free(key);
      |   ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_rsa_public_decrypt’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1271:3: warning: ‘RSA_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1271 |   outsize = RSA_size(key);
      |   ^~~~~~~
/usr/include/openssl/rsa.h:204:27: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
      |                           ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1300:3: warning: ‘RSA_public_decrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1300 |   if ((outsize = RSA_public_decrypt((int)cipher_length, cipher,
      |   ^~
/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/swipl-devel/packages/ssl/crypto4pl.c:1303:5: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1303 |     RSA_free(key);
      |     ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1313:3: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1313 |   RSA_free(key);
      |   ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_rsa_public_encrypt’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1354:3: warning: ‘RSA_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1354 |   outsize = RSA_size(key);
      |   ^~~~~~~
/usr/include/openssl/rsa.h:204:27: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
      |                           ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1381:3: warning: ‘RSA_public_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1381 |   if ( (outsize = RSA_public_encrypt((int)plain_length, plain,
      |   ^~
/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/swipl-devel/packages/ssl/crypto4pl.c:1385:5: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1385 |     RSA_free(key);
      |     ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1394:3: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1394 |   RSA_free(key);
      |   ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_rsa_private_encrypt’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1435:3: warning: ‘RSA_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1435 |   outsize = RSA_size(key);
      |   ^~~~~~~
/usr/include/openssl/rsa.h:204:27: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
      |                           ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1463:3: warning: ‘RSA_private_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1463 |   if ((outsize = RSA_private_encrypt((int)plain_length, plain,
      |   ^~
/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/swipl-devel/packages/ssl/crypto4pl.c:1467:5: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1467 |     RSA_free(key);
      |     ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1476:3: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1476 |   RSA_free(key);
      |   ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_rsa_sign’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1534:3: warning: ‘RSA_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1534 |   signature_len = RSA_size(key);
      |   ^~~~~~~~~~~~~
/usr/include/openssl/rsa.h:204:27: note: declared here
  204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
      |                           ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1548:3: warning: ‘RSA_sign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1548 |   rc = RSA_sign(type,
      |   ^~
/usr/include/openssl/rsa.h:348:27: note: declared here
  348 | OSSL_DEPRECATEDIN_3_0 int RSA_sign(int type, const unsigned char *m,
      |                           ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1555:3: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1555 |   RSA_free(key);
      |   ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_rsa_verify’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1594:3: warning: ‘RSA_verify’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1594 |   rc = RSA_verify(type,
      |   ^~
/usr/include/openssl/rsa.h:351:27: note: declared here
  351 | OSSL_DEPRECATEDIN_3_0 int RSA_verify(int type, const unsigned char *m,
      |                           ^~~~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1601:3: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1601 |   RSA_free(key);
      |   ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/crypto4pl.c: In function ‘pl_crypto_is_prime’:
/tmp/swipl-devel/packages/ssl/crypto4pl.c:1864:3: warning: ‘BN_is_prime_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1864 |   ret = BN_is_prime_ex(prime, nchecks, ctx, NULL);
      |   ^~~
In file included from /usr/include/openssl/params.h:16,
                 from /usr/include/openssl/evp.h:32,
                 from /usr/include/openssl/hmac.h:21:
/usr/include/openssl/bn.h:373:5: note: declared here
  373 | int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
      |     ^~~~~~~~~~~~~~
[18/22] Building C object packages/ssl/CMakeFiles/plugin_ssl4pl.dir/ssl4pl.c.o
/tmp/swipl-devel/packages/ssl/ssl4pl.c: In function ‘unify_rsa’:
/tmp/swipl-devel/packages/ssl/ssl4pl.c:814:3: warning: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  814 |   RSA_get0_key(rsa, &n, &e, &d);
      |   ^~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from /usr/include/openssl/x509v3.h:25,
                 from /tmp/swipl-devel/packages/ssl/ssl4pl.c:48:
/usr/include/openssl/rsa.h:217:28: note: declared here
  217 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
      |                            ^~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:815:3: warning: ‘RSA_get0_factors’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  815 |   RSA_get0_factors(rsa, &p, &q);
      |   ^~~~~~~~~~~~~~~~
/usr/include/openssl/rsa.h:220:28: note: declared here
  220 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_factors(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:816:3: warning: ‘RSA_get0_crt_params’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  816 |   RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp);
      |   ^~~~~~~~~~~~~~~~~~~
/usr/include/openssl/rsa.h:225:28: note: declared here
  225 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_crt_params(const RSA *r,
      |                            ^~~~~~~~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c: In function ‘unify_ec’:
/tmp/swipl-devel/packages/ssl/ssl4pl.c:851:3: warning: ‘i2o_ECPublicKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  851 |   int publen = i2o_ECPublicKey(key, &buf);
      |   ^~~
In file included from /usr/include/openssl/x509.h:33:
/usr/include/openssl/ec.h:1245:27: note: declared here
 1245 | OSSL_DEPRECATEDIN_3_0 int i2o_ECPublicKey(const EC_KEY *key, unsigned char **out);
      |                           ^~~~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:852:3: warning: ‘EC_KEY_get0_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  852 |   const BIGNUM* priv_bn = EC_KEY_get0_private_key(key);
      |   ^~~~~
/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/swipl-devel/packages/ssl/ssl4pl.c:853:3: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  853 |   const char* group = OBJ_nid2sn(EC_GROUP_get_curve_name(EC_KEY_get0_group(key)));
      |   ^~~~~
/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/swipl-devel/packages/ssl/ssl4pl.c: In function ‘unify_key’:
/tmp/swipl-devel/packages/ssl/ssl4pl.c:896:5: warning: ‘EVP_PKEY_get1_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  896 |     { RSAKEY* rsa = EVP_PKEY_get1_RSA(key);
      |     ^
In file included from /usr/include/openssl/rand.h:23,
                 from /tmp/swipl-devel/packages/ssl/ssl4pl.c:43:
/usr/include/openssl/evp.h:1348:16: note: declared here
 1348 | struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:898:7: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  898 |       RSA_free(rsa);
      |       ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
  293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:908:5: warning: ‘EVP_PKEY_get1_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  908 |     { EC_KEY* ec = EVP_PKEY_get1_EC_KEY(key);
      |     ^
/usr/include/openssl/evp.h:1374:19: note: declared here
 1374 | struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
      |                   ^~~~~~~~~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:910:7: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  910 |       EC_KEY_free(ec);
      |       ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:920:5: warning: ‘EVP_PKEY_get1_DH’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  920 |     { DH* dh = EVP_PKEY_get1_DH(key);
      |     ^
/usr/include/openssl/evp.h:1364:37: note: declared here
 1364 | OSSL_DEPRECATEDIN_3_0 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
      |                                     ^~~~~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:922:7: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  922 |       DH_free(dh);
      |       ^~~~~~~
In file included from /usr/include/openssl/dsa.h:51,
                 from /usr/include/openssl/x509.h:37:
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:932:5: warning: ‘EVP_PKEY_get1_DSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  932 |     { DSA* dsa = EVP_PKEY_get1_DSA(key);
      |     ^
/usr/include/openssl/evp.h:1357:16: note: declared here
 1357 | struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:934:7: warning: ‘DSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  934 |       DSA_free(dsa);
      |       ^~~~~~~~
/usr/include/openssl/dsa.h:127:28: note: declared here
  127 | OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
      |                            ^~~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c: In function ‘get_dh2048’:
/tmp/swipl-devel/packages/ssl/ssl4pl.c:2742:9: warning: ‘DH_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 2742 |         DHKEY *dh = DH_new();
      |         ^~~~~
/usr/include/openssl/dh.h:199:27: note: declared here
  199 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
      |                           ^~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c:2763:13: warning: ‘DH_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 2763 |             || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) {
      |             ^~
/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/swipl-devel/packages/ssl/ssl4pl.c:2764:11: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 2764 |           DH_free(dh);
      |           ^~~~~~~
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
/tmp/swipl-devel/packages/ssl/ssl4pl.c: In function ‘set_malleable_options’:
/tmp/swipl-devel/packages/ssl/ssl4pl.c:3040:5: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3040 |     if ( !(ecdh = EC_KEY_new_by_curve_name(OBJ_sn2nid(curve))) )
      |     ^~
/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/swipl-devel/packages/ssl/ssl4pl.c:3048:5: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 3048 |     EC_KEY_free(ecdh);          /* Safe because of reference counts */
      |     ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
[22/22] Linking CXX executable packages/swipl-win/swipl-win

:frowning: The odd thing is that I do not get these while OpenSSL 3 is used on various platforms. The main question though is what replaces these interfaces and is there a volunteer to make the necessary changes?

The OpenSSL 3 migration guide may contain some relevant info.

I’m not very familiar with the OpenSSL interface and the differences introduced in version 3, but I can give it a shot if there are no other takers

1 Like

That would be great, I don’t have much time now. :slight_smile:

Looking into it :slight_smile: Strangely I couldn’t reproduce these warnings yet on a Debian machine with a fresh OpenSSL built from source, even after explicitly adding -Wdeprecated-declarations to CFLAGS
I’ll update to a newer gcc (so far I tried with version 10.2) and see if it surfaces the warnings then.

Interesting. This is the file archlinux uses to build openssl: svntogit-packages/PKGBUILD at packages/openssl · archlinux/svntogit-packages · GitHub . Doesn’t look like it has anything special to enable the deprecation messages. So it must be the gcc version. I am using:

gcc version 12.2.0 (GCC) 
1 Like

@swi I was (finally) able to reproduce the deprecation warnings and I think I understand the situation a bit better now. The thing is that SWI-Prolog already prefers the non-deprecated EVP interface and the calls to the deprecated functions (the ones causing these warnings) seem to be correctly guarded by #ifdefs.

So to get the warnings I needed to unset USE_EVP_API explicitly. USE_EVP_API is defined whenever a set of functions are found during configuration, so now I’m wondering if one of these functions is missing from the Arch Linux OpenSSL distribution, and if so which one…

1 Like

@oskardrums thanks for figuring this out! I looked around to see why this could happen. At first I thought that it was caused by the fact that I have two openssl versions installed, 1.0 (I need it for some old binaries) and 3.0. So the first step I did was to remove openssl-1.0 and see what would happen. The warnings still showed up.

Next I thought, that if it depends on cmake finding some functions maybe it was keeping some stale settings in CMakeCache.txt, so I removed the cmake cache and voila! The warnings are gone.

Thanks for tracking this down!

EDIT: I am glad it was as easy as that.

1 Like