Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSSL v3.0 deprecated fuctions #15

Open
sats0k opened this issue Jan 20, 2022 · 1 comment
Open

OpenSSL v3.0 deprecated fuctions #15

sats0k opened this issue Jan 20, 2022 · 1 comment

Comments

@sats0k
Copy link
Contributor

sats0k commented Jan 20, 2022

Some of the warnings

src/util.h:392:20: warning: ‘int SHA256_Init(SHA256_CTX*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  392 |         SHA256_Init(&ctx);
      |         ~~~~~~~~~~~^~~~~~

deprecated: SHA256_Init, SHA256_Update, SHA256_Final

src/util.h:469:14: warning: ‘unsigned char* RIPEMD160(const unsigned char*, size_t, unsigned char*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  469 |     RIPEMD160((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2);
      |     ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

deprecated: RIPEMD160

src/key.cpp:36:27: warning: ‘int EC_KEY_set_private_key(EC_KEY*, const BIGNUM*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   36 |     EC_KEY_set_private_key(eckey,priv_key);
      |     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

deprecated: EC_KEY_set_private_key, EC_KEY_set_conv_form, EC_KEY_set_public_key, EC_KEY_free

src/key.cpp:269:33: warning: ‘int i2d_ECPrivateKey(const EC_KEY*, unsigned char**)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  269 |     int nSize = i2d_ECPrivateKey(pkey, NULL);
      |                 ~~~~~~~~~~~~~~~~^~~~~~~~~~~~

deprecated: i2d_ECPrivateKey, o2i_ECPublicKey

src/key.cpp:308:36: warning: ‘int ECDSA_size(const EC_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  308 |     unsigned int nSize = ECDSA_size(pkey);
      |                          ~~~~~~~~~~^~~~~~

deprecated: ECDSA_size, ECDSA_sign, ECDSA_do_sign, ECDSA_verify

The deprecated functions are still present and you may still use them.
However be aware that they may be removed from a future version of OpenSSL.
Shitch from the low level APIs to EVP APIs, this require to rewrite your code to use the high level APIs instead.

@ghostlander
Copy link
Owner

Yes, OpenSSL v3 needs some adjustments. Nothing critical though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants