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

Compilation warnings for deprecated SHA256_ functions in OpenSSL 3.0 #110

Closed
d99kris opened this issue Aug 14, 2022 · 0 comments
Closed
Assignees

Comments

@d99kris
Copy link
Owner

d99kris commented Aug 14, 2022

Compilation warnings observed on newer OpenSSL versions, for example in Ubuntu 22.04.1:

/home/d99kris/git/nmail/src/crypto.cpp: In static member function ‘static std::string Crypto::SHA256(const string&)’:
/home/d99kris/git/nmail/src/crypto.cpp:143:14: warning: ‘int SHA256_Init(SHA256_CTX*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  143 |   SHA256_Init(&sha256);
      |   ~~~~~~~~~~~^~~~~~~~~
In file included from /home/d99kris/git/nmail/src/crypto.cpp:18:
/usr/include/openssl/sha.h:73:27: note: declared here
   73 | OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c);
      |                           ^~~~~~~~~~~
/home/d99kris/git/nmail/src/crypto.cpp:144:16: warning: ‘int SHA256_Update(SHA256_CTX*, const void*, size_t)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  144 |   SHA256_Update(&sha256, p_Str.c_str(), p_Str.size());
      |   ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/d99kris/git/nmail/src/crypto.cpp:18:
/usr/include/openssl/sha.h:74:27: note: declared here
   74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
      |                           ^~~~~~~~~~~~~
/home/d99kris/git/nmail/src/crypto.cpp:145:15: warning: ‘int SHA256_Final(unsigned char*, SHA256_CTX*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  145 |   SHA256_Final(hash, &sha256);
      |   ~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /home/d99kris/git/nmail/src/crypto.cpp:18:
/usr/include/openssl/sha.h:76:27: note: declared here
   76 | OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
      |                           ^~~~~~~~~~~~
@d99kris d99kris self-assigned this Aug 14, 2022
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

1 participant