feat(http): Modify for esp8266

This commit is contained in:
yuanjm
2020-08-07 11:47:43 +08:00
parent 9ea5d2abe7
commit 08a4fe0d61
7 changed files with 19 additions and 6 deletions

View File

@@ -19,7 +19,7 @@
#include "esp_netif.h"
#include "lwip/sockets.h"
#include "esp32/rom/md5_hash.h"
#include "rom/md5_hash.h"
#include "mbedtls/base64.h"
#include "esp_system.h"
@@ -81,6 +81,10 @@ char *http_auth_digest(const char *username, const char *password, esp_http_auth
return NULL;
}
if (auth_data->algorithm == NULL) {
auth_data->algorithm = "md5";
}
ha1 = calloc(1, MD5_MAX_LEN);
HTTP_MEM_CHECK(TAG, ha1, goto _digest_exit);