Skip to content

Commit 440f3f6

Browse files
committed
Fix MD5 compilation error
Manual workaround in forked repo me-no-dev#1085 (comment)
1 parent f71e3d4 commit 440f3f6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/WebAuthentication.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@ static bool getMD5(uint8_t * data, uint16_t len, char * output){//33 bytes or mo
6969
if(_buf == NULL)
7070
return false;
7171
memset(_buf, 0x00, 16);
72-
#ifdef ESP32
72+
#ifdef ESP32 // md5 updated per https://github.com/me-no-dev/ESPAsyncWebServer/issues/1085
7373
mbedtls_md5_init(&_ctx);
74-
mbedtls_md5_starts_ret(&_ctx);
75-
mbedtls_md5_update_ret(&_ctx, data, len);
76-
mbedtls_md5_finish_ret(&_ctx, _buf);
74+
mbedtls_md5_update_ret (&_ctx,data,len);
75+
mbedtls_md5_finish_ret(&_ctx,data);
76+
mbedtls_internal_md5_process( &_ctx ,data);
77+
// mbedtls_md5_starts(&_ctx);
78+
// mbedtls_md5_update(&_ctx, data, len);
79+
// mbedtls_md5_finish(&_ctx, _buf);
7780
#else
7881
MD5Init(&_ctx);
7982
MD5Update(&_ctx, data, len);

0 commit comments

Comments
 (0)