8000 update sha · estx07/esp32_https_server@87384ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 87384ab

Browse files
committed
update sha
1 parent de1876c commit 87384ab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/HTTPConnection.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,8 @@ void handleWebsocketHandshake(HTTPRequest * req, HTTPResponse * res) {
664664
std::string websocketKeyResponseHash(std::string const &key) {
665665
std::string newKey = key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
666666
uint8_t shaData[HTTPS_SHA1_LENGTH];
667-
esp_sha(SHA1, (uint8_t*)newKey.data(), newKey.length(), shaData);
667+
// esp_sha(SHA1, (uint8_t*)newKey.data(), newKey.length(), shaData);
668+
mbedtls_sha1_ret((uint8_t*)newKey.data(), newKey.length(), shaData);
668669

669670
// Get output size required for base64 representation
670671
size_t b64BufferSize = 0;

src/HTTPConnection.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <string>
88
#include <mbedtls/base64.h>
9-
#include <hwcrypto/sha.h>
9+
#include <mbedtls/sha1.h>
1010
#include <functional>
1111

1212
// Required for sockets

0 commit comments

Comments
 (0)
0