Skip to content

OpenSSL v3.0 deprecated fuctions #15

@sats0k

Description

@sats0k

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions