me-no-dev / ESPAsyncWebServer

Async Web Server for ESP8266 and ESP32
3.72k stars 1.21k forks source link

compilation error with ESP 2.01 library compilation erreur WebAuthentication.cpp:73: undefined reference to mbedtls_md5_starts' #1085

Open fbell58 opened 2 years ago

fbell58 commented 2 years ago

i have a sckech witch is compling ok in version 1.6 of ESP32 library arduino software (ESP32 Arduino Release 1.0.6 based on ESP-IDF v3.3.5)

I have upgrade to the new 2.0.1 ESP library soft (ESP32 Arduino 2.0.1 based on ESP-IDF 4.4)

and I get the following error ? anay idea of what I can do to solde that ?

_Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: libraries/ESPAsyncWebServer-master/WebAuthentication.cpp.o: in function getMD5(unsigned char*, unsigned short, char*)': /Volumes/homes-1/NAS_francois/Drive/Arduino/libraries/ESPAsyncWebServer-master/src/WebAuthentication.cpp:73: undefined reference tombedtls_md5_starts'_

fbell58 commented 2 years ago

**I found I think in Arduino new package old mbedtls have been removed (depreciated...) I change with the new fonction in "WebAuthentication.h" and I can compile this out error .... It is strange that I am the only one ????

extract from md(. h in new package ....*

_ MBEDTLS_DEPRECATED void mbedtls_md5_starts( mbedtls_md5_context ctx );

/**

/**

/**

undef MBEDTLS_DEPRECATED

endif / !MBEDTLS_DEPRECATED_REMOVED /_

beats0126 commented 2 years ago

meet the same issue

fbell58 commented 2 years ago

meet the same issue

As I try to explain You can try to solve by replacing obsolet call by the new one ...I did not test all function but for me there is no compilation issue and the server is working fine .....

weoiss1998 commented 2 years ago

Hi, sorry to ask. @fbell58 what do I have to do exactly?

fbell58 commented 2 years ago

Hi, sorry to ask. @fbell58 what do I have to do exactly?

you must modify WebAuthentication.cpp as this (it is working for me but of course i did not make all the possible tests for any specific case ....)

you modify in the library directory your_directory/Arduino/libraries/ESPAsyncWebServer-master/src/WebAuthentication.cpp

line 72 with this (the comment are the old line ......)

ifdef ESP32

mbedtls_md5_init(&_ctx); mbedtls_md5_update_ret (&_ctx,data,len); mbedtls_md5_finish_ret(&_ctx,data); mbedtls_internal_md5_process( &_ctx ,data); // mbedtls_md5_starts(&_ctx); // mbedtls_md5_update(&_ctx, data, len); // mbedtls_md5_finish(&_ctx, _buf);

weoiss1998 commented 2 years ago

ok, thank you

drmpf commented 2 years ago

Now could be a library version number issue. There was no increase in this library's version when the mbed fix was made so no indication in Arduino library manager that you don't have the latest code. see #1128

MartinVerges commented 2 years ago

Thank you @fbell58

stale[bot] commented 2 years ago

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

MartinVerges commented 2 years ago

needs to be fixed, not stale!

stale[bot] commented 2 years ago

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

stale[bot] commented 1 year ago

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

Renato-Sanchez commented 1 year ago

ainda errado

stale[bot] commented 1 year ago

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.