eggdrop icon indicating copy to clipboard operation
eggdrop copied to clipboard

openssl-3.0.0-alpha7 deprecation warnings

Open michaelortmann opened this issue 5 years ago • 0 comments

PR #1010 fixes deprecations warnings for openssl-3.0.0-alpha6

meanwhile openssl-3.0.0-alpha7 is out and with it come new deprecation warnings (about MD5 functions) we should fix in time:

[...]
gcc -g -O2 -pipe -Wall -I.. -I.. -I/home/michael/opt/openssl-3.0.0-alpha7/include -DHAVE_CONFIG_H -I/usr/include -g3 -DDEBUG -DDEBUG_ASSERT -DDEBUG_MEM -DDEBUG_DNS  -c dcc.c
dcc.c: In function ‘dcc_bot_digest’:
dcc.c:330:3: warning: ‘MD5_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  330 |   MD5_Init(&md5context);
      |   ^~~~~~~~
In file included from /home/michael/opt/openssl-3.0.0-alpha7/include/openssl/opensslv.h:109,
                 from /home/michael/opt/openssl-3.0.0-alpha7/include/openssl/macros.h:11,
                 from /home/michael/opt/openssl-3.0.0-alpha7/include/openssl/opensslconf.h:14,
                 from /home/michael/opt/openssl-3.0.0-alpha7/include/openssl/macros.h:10,
                 from /home/michael/opt/openssl-3.0.0-alpha7/include/openssl/ssl.h:21,
                 from eggdrop.h:269,
                 from main.h:90,
                 from dcc.c:26:
/home/michael/opt/openssl-3.0.0-alpha7/include/openssl/md5.h:49:22: note: declared here
   49 | DEPRECATEDIN_3_0(int MD5_Init(MD5_CTX *c))
      |                      ^~~~~~~~
/home/michael/opt/openssl-3.0.0-alpha7/include/openssl/macros.h:179:71: note: in definition of macro ‘DEPRECATEDIN_3_0’
  179 | #   define DEPRECATEDIN_3_0(f)                  OSSL_DEPRECATEDIN_3_0 f;
      |                                                                       ^
dcc.c:331:3: warning: ‘MD5_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  331 |   MD5_Update(&md5context, (unsigned char *) challenge, strlen(challenge));
      |   ^~~~~~~~~~
In file included from /home/michael/opt/openssl-3.0.0-alpha7/include/openssl/opensslv.h:109,
                 from /home/michael/opt/openssl-3.0.0-alpha7/include/openssl/macros.h:11,
                 from /home/michael/opt/openssl-3.0.0-alpha7/include/openssl/opensslconf.h:14,
                 from /home/michael/opt/openssl-3.0.0-alpha7/include/openssl/macros.h:10,
                 from /home/michael/opt/openssl-3.0.0-alpha7/include/openssl/ssl.h:21,
                 from eggdrop.h:269,
                 from main.h:90,
                 from dcc.c:26:
/home/michael/opt/openssl-3.0.0-alpha7/include/openssl/md5.h:50:22: note: declared here
   50 | DEPRECATEDIN_3_0(int MD5_Update(MD5_CTX *c, const void *data, size_t len))
      |                      ^~~~~~~~~~
/home/michael/opt/openssl-3.0.0-alpha7/include/openssl/macros.h:179:71: note: in definition of macro ‘DEPRECATEDIN_3_0’
  179 | #   define DEPRECATEDIN_3_0(f)                  OSSL_DEPRECATEDIN_3_0 f;
      |                                                                       ^
[...]

Related to #953

man page https://www.openssl.org/docs/manmaster/man3/MD5_Init.html says: "All of the functions described on this page are deprecated. Applications should instead use EVP_DigestInit_ex(3), EVP_DigestUpdate(3) and EVP_DigestFinal_ex(3)." we could do this, but there is one problem:

MD5_Init() is part of eggdrops module API. I think we can not break it with eggdrop 1.9 but must wait for eggdrop 2.0.

If you wonder, why openssl deprecated the low level api functions you can read up some good points here: https://github.com/openssl/openssl/issues/12260

michaelortmann avatar Oct 21 '20 03:10 michaelortmann