[Home]

Summary:ASTERISK-30056: res_crypto.c build warnings
Reporter:Mark Murawski (kobaz)Labels:fax
Date Opened:2022-05-11 04:43:25Date Closed:2022-05-11 04:47:18
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_crypto
Versions:19.3.3 Frequency of
Occurrence
Related
Issues:
duplicatesASTERISK-30046 Reimplement res/res_crypto.c internals with EVP_PKEY interface to Openssl API's
Environment:Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy Attachments:
Description:{noformat}
  [CC] res_fax.c -> res_fax.o
res_crypto.c: In function ‘try_load_key’:
res_crypto.c:255:17: warning: ‘PEM_read_RSA_PUBKEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 255 |                 key->rsa = PEM_read_RSA_PUBKEY(f, NULL, pw_cb, key);
     |                 ^~~
In file included from /usr/include/openssl/ssl.h:36,
                from res_crypto.c:40:
/usr/include/openssl/pem.h:449:1: note: declared here
 449 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, RSA_PUBKEY, RSA)
     | ^~~~~~~~~~~~~~~~~~~
res_crypto.c:257:17: warning: ‘PEM_read_RSAPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 257 |                 key->rsa = PEM_read_RSAPrivateKey(f, NULL, pw_cb, key);
     |                 ^~~
In file included from /usr/include/openssl/ssl.h:36,
                from res_crypto.c:40:
/usr/include/openssl/pem.h:447:1: note: declared here
 447 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
     | ^~~~~~~~~~~~~~~~~~~~~~
res_crypto.c:261:17: warning: ‘RSA_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 261 |                 if (RSA_size(key->rsa) == 128) {
     |                 ^~
In file included from /usr/include/openssl/x509.h:36,
                from /usr/include/openssl/ssl.h:31,
                from res_crypto.c:40:
/usr/include/openssl/rsa.h:204:27: note: declared here
 204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
     |                           ^~~~~~~~
res_crypto.c: In function ‘__ast_sign_bin’:
res_crypto.c:319:9: warning: ‘RSA_sign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 319 |         if (!(res = RSA_sign(NID_sha1, digest, sizeof(digest), dsig, &siglen, key->rsa))) {
     |         ^~
In file included from /usr/include/openssl/x509.h:36,
                from /usr/include/openssl/ssl.h:31,
                from res_crypto.c:40:
/usr/include/openssl/rsa.h:348:27: note: declared here
 348 | OSSL_DEPRECATEDIN_3_0 int RSA_sign(int type, const unsigned char *m,
     |                           ^~~~~~~~
res_crypto.c: In function ‘__ast_decrypt_bin’:
res_crypto.c:352:17: warning: ‘RSA_private_decrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 352 |                 if ((res = RSA_private_decrypt(128, src, dst, key->rsa, RSA_PKCS1_OAEP_PADDING)) < 0) {
     |                 ^~
In file included from /usr/include/openssl/x509.h:36,
                from /usr/include/openssl/ssl.h:31,
                from res_crypto.c:40:
/usr/include/openssl/rsa.h:291:5: note: declared here
 291 | int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
     |     ^~~~~~~~~~~~~~~~~~~
res_crypto.c: In function ‘__ast_encrypt_bin’:
res_crypto.c:383:17: warning: ‘RSA_public_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 383 |                 if ((res = RSA_public_encrypt(bytes, src, dst, key->rsa, RSA_PKCS1_OAEP_PADDING)) != 128) {
     |                 ^~
In file included from /usr/include/openssl/x509.h:36,
                from /usr/include/openssl/ssl.h:31,
                from res_crypto.c:40:
/usr/include/openssl/rsa.h:282:5: note: declared here
 282 | int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
     |     ^~~~~~~~~~~~~~~~~~
res_crypto.c: In function ‘__ast_check_signature_bin’:
res_crypto.c:432:9: warning: ‘RSA_verify’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 432 |         if (!(res = RSA_verify(NID_sha1, digest, sizeof(digest), (unsigned char *)dsig, 128, key->rsa))) {
     |         ^~
In file included from /usr/include/openssl/x509.h:36,
                from /usr/include/openssl/ssl.h:31,
                from res_crypto.c:40:
/usr/include/openssl/rsa.h:351:27: note: declared here
 351 | OSSL_DEPRECATEDIN_3_0 int RSA_verify(int type, const unsigned char *m,
     |                           ^~~~~~~~~~
res_crypto.c: In function ‘__ast_aes_set_encrypt_key’:
res_crypto.c:468:9: warning: ‘AES_set_encrypt_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 468 |         return AES_set_encrypt_key(key, 128, ctx);
     |         ^~~~~~
In file included from res_crypto.c:38:
/usr/include/openssl/aes.h:51:5: note: declared here
  51 | int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
     |     ^~~~~~~~~~~~~~~~~~~
res_crypto.c: In function ‘__ast_aes_set_decrypt_key’:
res_crypto.c:473:9: warning: ‘AES_set_decrypt_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 473 |         return AES_set_decrypt_key(key, 128, ctx);
     |         ^~~~~~
In file included from res_crypto.c:38:
/usr/include/openssl/aes.h:54:5: note: declared here
  54 | int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
     |     ^~~~~~~~~~~~~~~~~~~
res_crypto.c: In function ‘__ast_aes_encrypt’:
res_crypto.c:478:9: warning: ‘AES_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 478 |         return AES_encrypt(in, out, ctx);
     |         ^~~~~~
In file included from res_crypto.c:38:
/usr/include/openssl/aes.h:57:6: note: declared here
  57 | void AES_encrypt(const unsigned char *in, unsigned char *out,
     |      ^~~~~~~~~~~
res_crypto.c: In function ‘__ast_aes_decrypt’:
res_crypto.c:483:9: warning: ‘AES_decrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 483 |         return AES_decrypt(in, out, ctx);
     |         ^~~~~~
In file included from res_crypto.c:38:
/usr/include/openssl/aes.h:60:6: note: declared here
  60 | void AES_decrypt(const unsigned char *in, unsigned char *out,
     |      ^~~~~~~~~~~
res_crypto.c: In function ‘crypto_load’:
res_crypto.c:525:33: warning: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 525 |                                 RSA_free(key->rsa);
     |                                 ^~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                from /usr/include/openssl/ssl.h:31,
                from res_crypto.c:40:
/usr/include/openssl/rsa.h:293:28: note: declared here
 293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
     |                            ^~~~~~~~
  [CC] res_fax_spandsp.c -> res_fax_spandsp.o
  [CC] res_format_attr_celt.c -> res_format_attr_celt.o
  [CC] res_format_attr_g729.c -> res_format_attr_g729.o
  [CC] res_format_attr_h263.c -> res_format_attr_h263.o
  [CC] res_format_attr_h264.c -> res_format_attr_h264.o
{noformat}
Comments:By: Asterisk Team (asteriskteam) 2022-05-11 04:43:26.758-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2022-05-11 04:46:46.676-0500

These have been suppressed already for next releases https://gerrit.asterisk.org/c/asterisk/+/18263 and ASTERISK-30046 exists for moving away from deprecated functions.