mirror of
https://github.com/esphome/esphome.git
synced 2025-09-28 16:12:24 +01:00
stack it
This commit is contained in:
@@ -725,8 +725,8 @@ bool ESPHomeOTAComponent::prepare_auth_nonce_(HashBase *hasher) {
|
||||
const size_t hex_size = hasher->get_size() * 2;
|
||||
const size_t nonce_len = hasher->get_size() / 4;
|
||||
// Buffer needs: 1 (auth_type) + hex_size (nonce) + hex_size*2 (cnonce+response)
|
||||
this->auth_buf_size_ = 1 + hex_size + hex_size * 2;
|
||||
this->auth_buf_ = std::make_unique<uint8_t[]>(this->auth_buf_size_);
|
||||
const size_t auth_buf_size = 1 + hex_size + hex_size * 2;
|
||||
this->auth_buf_ = std::make_unique<uint8_t[]>(auth_buf_size);
|
||||
this->auth_buf_pos_ = 0;
|
||||
|
||||
// Generate nonce
|
||||
|
@@ -83,7 +83,6 @@ class ESPHomeOTAComponent : public ota::OTAComponent {
|
||||
uint8_t ota_features_{0};
|
||||
#ifdef USE_OTA_PASSWORD
|
||||
std::unique_ptr<uint8_t[]> auth_buf_;
|
||||
size_t auth_buf_size_{0};
|
||||
size_t auth_buf_pos_{0};
|
||||
uint8_t auth_type_{0}; // Store auth type to know which hasher to use
|
||||
#endif // USE_OTA_PASSWORD
|
||||
|
Reference in New Issue
Block a user