1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-28 16:12:24 +01:00
This commit is contained in:
J. Nick Koston
2025-09-26 23:26:54 -05:00
parent 3b92c6630d
commit e2c637cf48
2 changed files with 2 additions and 3 deletions

View File

@@ -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

View File

@@ -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