I get a bunch of -Wdeprecated-declarations warnings on GCC 14.2.0:
encrypt_openssl.c: In function ‘RSA_keylen’:
encrypt_openssl.c:487:5: warning: ‘RSA_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
487 | return RSA_size(rsa);
| ^~~~~~
In file included from encrypt_openssl.c:43:
/usr/include/openssl/rsa.h:215:27: note: declared here
215 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
| ^~~~~~~~
encrypt_openssl.c: In function ‘EC_keylen’:
encrypt_openssl.c:501:5: warning: ‘i2o_ECPublicKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
Just to name a few.
Could you take a look at them? Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Changing this code to use the EVP_PKEY function instead of the RSA and EC functions will take some time, and I'm not sure if doing so will break systems still using OpenSSL 1.1.
In the meantime, you can add -Wno-deprecated-declarations to the CFLAGS variable in the makefile to silence the warnings.
Regards,
Dennis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Dennis,
I get a bunch of -Wdeprecated-declarations warnings on GCC 14.2.0:
encrypt_openssl.c: In function ‘RSA_keylen’:
encrypt_openssl.c:487:5: warning: ‘RSA_size’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
487 | return RSA_size(rsa);
| ^~~~~~
In file included from encrypt_openssl.c:43:
/usr/include/openssl/rsa.h:215:27: note: declared here
215 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
| ^~~~~~~~
encrypt_openssl.c: In function ‘EC_keylen’:
encrypt_openssl.c:501:5: warning: ‘i2o_ECPublicKey’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
Just to name a few.
Could you take a look at them? Thanks.
Yegor,
Changing this code to use the EVP_PKEY function instead of the RSA and EC functions will take some time, and I'm not sure if doing so will break systems still using OpenSSL 1.1.
In the meantime, you can add -Wno-deprecated-declarations to the CFLAGS variable in the makefile to silence the warnings.
Regards,
Dennis