mfontanini / libtins

High-level, multiplatform C++ network packet sniffing and crafting library.
http://libtins.github.io/
BSD 2-Clause "Simplified" License
1.89k stars 374 forks source link

Deprecation warnings on gcc 12.1 #475

Open fhuberts opened 2 years ago

fhuberts commented 2 years ago

Updated to Fedora 36 with gcc 12.1, got deprecation warnings:

[ 16%] Building CXX object lib/libtins/src/CMakeFiles/tins.dir/handshake_capturer.cpp.o
libtins/src/crypto.cpp: In member function ‘Tins::SNAP* Tins::Crypto::WPA2::SessionKeys::ccmp_decrypt_unicast(const Tins::Dot11Data&, Tins::RawPDU&) const’:
libtins/src/crypto.cpp:489:24: warning: ‘int AES_set_encrypt_key(const unsigned char*, int, AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  489 |     AES_set_encrypt_key(&ptk_[0] + 32, 128, &ctx);
      |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libtins/src/crypto.cpp:38:
/usr/include/openssl/aes.h:51:5: note: declared here
   51 | int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
      |     ^~~~~~~~~~~~~~~~~~~
libtins/src/crypto.cpp:507:16: warning: ‘void AES_encrypt(const unsigned char*, unsigned char*, const AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  507 |     AES_encrypt(counter, MIC, &ctx);
      |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/aes.h:57:6: note: declared here
   57 | void AES_encrypt(const unsigned char *in, unsigned char *out,
      |      ^~~~~~~~~~~
libtins/src/crypto.cpp:509:16: warning: ‘void AES_encrypt(const unsigned char*, unsigned char*, const AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  509 |     AES_encrypt(MIC, MIC, &ctx);
      |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/openssl/aes.h:57:6: note: declared here
   57 | void AES_encrypt(const unsigned char *in, unsigned char *out,
      |      ^~~~~~~~~~~
libtins/src/crypto.cpp:511:16: warning: ‘void AES_encrypt(const unsigned char*, unsigned char*, const AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  511 |     AES_encrypt(MIC, MIC, &ctx);
      |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/openssl/aes.h:57:6: note: declared here
   57 | void AES_encrypt(const unsigned char *in, unsigned char *out,
      |      ^~~~~~~~~~~
libtins/src/crypto.cpp:515:16: warning: ‘void AES_encrypt(const unsigned char*, unsigned char*, const AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  515 |     AES_encrypt(counter, crypted_block, &ctx);
      |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/aes.h:57:6: note: declared here
   57 | void AES_encrypt(const unsigned char *in, unsigned char *out,
      |      ^~~~~~~~~~~
libtins/src/crypto.cpp:526:20: warning: ‘void AES_encrypt(const unsigned char*, unsigned char*, const AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  526 |         AES_encrypt(counter, crypted_block, &ctx );
      |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/aes.h:57:6: note: declared here
   57 | void AES_encrypt(const unsigned char *in, unsigned char *out,
      |      ^~~~~~~~~~~
libtins/src/crypto.cpp:531:20: warning: ‘void AES_encrypt(const unsigned char*, unsigned char*, const AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  531 |         AES_encrypt(MIC, MIC, &ctx);
      |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/openssl/aes.h:57:6: note: declared here
   57 | void AES_encrypt(const unsigned char *in, unsigned char *out,
      |      ^~~~~~~~~~~