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

Function mbedtls_md5_starts() was renamed, needs to be renamed in WebAuthentication.cpp #3

Open
serpinio opened this issue May 12, 2022 · 4 comments

Comments

@serpinio
Copy link

Just wanted to share an FYI and a fix:

SDK md5.h file had a small change in ESP framework: the mbedtls_md5_starts() was renamed which invalidated auth calls with the current version of AsyncWebserver fork with an "undefined reference to mbedtls_md5_starts" error.

How to fix:

Change these three lines in WebAuthentication.cpp:

  mbedtls_md5_starts(&_ctx);
  mbedtls_md5_update(&_ctx, data, len);
  mbedtls_md5_finish(&_ctx, _buf);

To:

  mbedtls_md5_starts_ret(&_ctx);
  mbedtls_md5_update_ret(&_ctx, data, len);
  mbedtls_md5_finish_ret(&_ctx, _buf);

Original discussion: me-no-dev/ESPAsyncWebServer#1147

@1024eric
Copy link

Brilliant thanks Serpinio. Been searching for a solution that worked for hours!

@LuisYadier
Copy link

Thank you very much to solve the problem with your instructions!

@lemar017
Copy link

lemar017 commented Oct 7, 2023

Now it compile like a charm Thank's

@HARIS4820
Copy link

Just wanted to share an FYI and a fix:

SDK md5.h file had a small change in ESP framework: the mbedtls_md5_starts() was renamed which invalidated auth calls with the current version of AsyncWebserver fork with an "undefined reference to mbedtls_md5_starts" error.

How to fix:

Change these three lines in WebAuthentication.cpp:

  mbedtls_md5_starts(&_ctx);
  mbedtls_md5_update(&_ctx, data, len);
  mbedtls_md5_finish(&_ctx, _buf);

To:

  mbedtls_md5_starts_ret(&_ctx);
  mbedtls_md5_update_ret(&_ctx, data, len);
  mbedtls_md5_finish_ret(&_ctx, _buf);

Original discussion: me-no-dev/ESPAsyncWebServer#1147

in my case the issue was

Arduino/libraries/ESPAsyncWebServer/src/WebAuthentication.cpp:74:3: error: 'mbedtls_md5_starts_ret' was not declared in this scope; did you mean 'mbedtls_md5_starts'?
74 | mbedtls_md5_starts_ret(&_ctx);

arduino 2.3.2
ubuntu 24.4
esp32 3.0.2
espasyncwebserver 3.1.0

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

5 participants