FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Switch to mbedtls sha · pyromanci/esp32_https_server@acb9fe8 · GitHub

Repository navigation

Commit acb9fe8

Browse files
authored andcommitted
Switch to mbedtls sha
1 parent d4ebb98 commit acb9fe8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/HTTPConnection.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ 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+
mbedtls_sha1_ret((uint8_t*)newKey.data(), newKey.length(), shaData);
668668

669669
// Get output size required for base64 representation
670670
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)

Back | FazBrowse Home | New Git URL