Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/esp32FOTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ void esp32FOTA::setConfig( FOTAConfig_t cfg )
_cfg.root_ca = cfg.root_ca;
_cfg.pub_key = cfg.pub_key;
_cfg.signature_len = cfg.signature_len;
_cfg.allow_reuse = cfg.allow_reuse;
}


Expand All @@ -206,7 +207,8 @@ void esp32FOTA::printConfig( FOTAConfig_t *cfg )
cfg->use_device_id ?"true":"false",
cfg->root_ca ?"true":"false",
cfg->pub_key ?"true":"false",
cfg->signature_len
cfg->signature_len,
cfg->allow_reuse
);
}

Expand Down Expand Up @@ -364,7 +366,8 @@ bool esp32FOTA::setupHTTP( const char* url )
{
const char* rootcastr = nullptr;
_http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);

_http.setReuse(_cfg.allow_reuse);

log_i("Connecting to: %s", url );
if( String(url).startsWith("https") ) {
if (!_cfg.unsafe) {
Expand Down
1 change: 1 addition & 0 deletions src/esp32FOTA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ struct FOTAConfig_t
CryptoAsset* root_ca { nullptr };
CryptoAsset* pub_key { nullptr };
size_t signature_len {FW_SIGNATURE_LENGTH};
bool allow_reuse { true };
FOTAConfig_t() = default;
};

Expand Down