Skip to content

deprecated OpenSSL 3.0 API warnings #51

@notroj

Description

@notroj

Describe the bug
A few deprecation warnings when building against OpenSSL 3.0 should be addressed:

ne_md5.c: In function 'ne_md5_create_ctx':
ne_md5.c:377:5: warning: 'MD5_Init' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  377 |     if (MD5_Init(&ctx->ctx) != 1) {
      |     ^~
In file included from ne_md5.c:34:
/usr/include/openssl/md5.h:49:27: note: declared here
   49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
      |                           ^~~~~~~~
ne_md5.c: In function 'ne_md5_process_block':
ne_md5.c:388:5: warning: 'MD5_Update' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  388 |     MD5_Update(&ctx->ctx, buffer, len);
      |     ^~~~~~~~~~
In file included from ne_md5.c:34:
/usr/include/openssl/md5.h:50:27: note: declared here
   50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
      |                           ^~~~~~~~~~
ne_md5.c: In function 'ne_md5_process_bytes':
ne_md5.c:394:5: warning: 'MD5_Update' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  394 |     MD5_Update(&ctx->ctx, buffer, len);
      |     ^~~~~~~~~~
In file included from ne_md5.c:34:
/usr/include/openssl/md5.h:50:27: note: declared here
   50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
      |                           ^~~~~~~~~~
ne_md5.c: In function 'ne_md5_finish_ctx':
ne_md5.c:399:5: warning: 'MD5_Final' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  399 |     MD5_Final(resbuf, &ctx->ctx);
      |     ^~~~~~~~~
In file included from ne_md5.c:34:
/usr/include/openssl/md5.h:51:27: note: declared here
   51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
      |                           ^~~~~~~~~
ne_md5.c: In function 'ne_md5_reset_ctx':
ne_md5.c:411:5: warning: 'MD5_Init' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  411 |     MD5_Init(&ctx->ctx);
      |     ^~~~~~~~
In file included from ne_md5.c:34:
/usr/include/openssl/md5.h:49:27: note: declared here
   49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
      |                           ^~~~~~~~

and

ne_md5.c: In function 'ne_md5_create_ctx':
ne_md5.c:377:5: warning: 'MD5_Init' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  377 |     if (MD5_Init(&ctx->ctx) != 1) {
      |     ^~
In file included from ne_md5.c:34:
/usr/include/openssl/md5.h:49:27: note: declared here
   49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
      |                           ^~~~~~~~
ne_md5.c: In function 'ne_md5_process_block':
ne_md5.c:388:5: warning: 'MD5_Update' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  388 |     MD5_Update(&ctx->ctx, buffer, len);
      |     ^~~~~~~~~~
In file included from ne_md5.c:34:
/usr/include/openssl/md5.h:50:27: note: declared here
   50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
      |                           ^~~~~~~~~~
ne_md5.c: In function 'ne_md5_process_bytes':
ne_md5.c:394:5: warning: 'MD5_Update' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  394 |     MD5_Update(&ctx->ctx, buffer, len);
      |     ^~~~~~~~~~
In file included from ne_md5.c:34:
/usr/include/openssl/md5.h:50:27: note: declared here
   50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
      |                           ^~~~~~~~~~
ne_md5.c: In function 'ne_md5_finish_ctx':
ne_md5.c:399:5: warning: 'MD5_Final' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  399 |     MD5_Final(resbuf, &ctx->ctx);
      |     ^~~~~~~~~
In file included from ne_md5.c:34:
/usr/include/openssl/md5.h:51:27: note: declared here
   51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
      |                           ^~~~~~~~~
ne_md5.c: In function 'ne_md5_reset_ctx':
ne_md5.c:411:5: warning: 'MD5_Init' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  411 |     MD5_Init(&ctx->ctx);
      |     ^~~~~~~~
In file included from ne_md5.c:34:
/usr/include/openssl/md5.h:49:27: note: declared here
   49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
      |                           ^~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions