Skip to content

Commit 7dfae12

Browse files
committed
code cleanup
1 parent 31d376b commit 7dfae12

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/esp32FOTA.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@ bool esp32FOTA::checkJSONManifest(JsonVariant doc)
618618
_payload_sem = SemverClass(0);
619619
}
620620

621-
//debugSemVer("Payload firmware version", &_payloadVersion );
622621
debugSemVer("Payload firmware version", _payload_sem.ver() );
623622

624623
// Memoize some values to help with the decision tree
@@ -710,7 +709,6 @@ bool esp32FOTA::execHTTPcheck()
710709
log_i("Getting HTTP: %s", useURL.c_str());
711710
log_i("------");
712711

713-
//_http.useHTTP10(true);
714712
if(! setupHTTP( useURL.c_str() ) ) {
715713
log_e("Unable to setup http, aborting!");
716714
return false;

src/esp32FOTA.hpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ extern "C" {
8484
#define F_UpdateEnd() (mode_z ? F_Update.endz() : F_Update.end())
8585
#define F_abort() if (mode_z) F_Update.abortz(); else F_Update.abort()
8686
#define F_writeStream() (mode_z ? F_Update.writezStream(*_stream, updateSize) : F_Update.writeStream(*_stream))
87-
#define F_isGzStream() false
8887
#elif __has_include("ESP32-targz.h")
8988
#pragma message "Using GzUpdateClass as Update agent"
9089
#include <ESP32-targz.h>
@@ -160,24 +159,12 @@ class CryptoMemAsset : public CryptoAsset
160159
};
161160

162161

163-
// signature validation available methods
164-
/*
165-
enum SigType_t
166-
{
167-
FOTA_SIG_PREPEND, // signature is contatenated with file (default)
168-
FOTA_SIG_FILE, // signature is in a separate file
169-
FOTA_SIG_JSON_PROPERTY, // signature is a JSON property
170-
FOTA_SIG_HTTP_HEADER // signature is a HTTP header
171-
};
172-
*/
173-
174162
struct FOTAConfig_t
175163
{
176164
const char* name { nullptr };
177165
const char* manifest_url { nullptr };
178166
SemverClass sem {0};
179167
bool check_sig { false };
180-
//SigType_t type_sig {FOTA_SIG_PREPEND};
181168
bool unsafe { false };
182169
bool use_device_id { false };
183170
CryptoAsset* root_ca { nullptr };
@@ -210,13 +197,9 @@ class esp32FOTA : public UpdateClass
210197
esp32FOTA(const String &firwmareType, const String &firmwareSemanticVersion, bool validate = false, bool allow_insecure_https = false )
211198
: esp32FOTA(firwmareType.c_str(), firmwareSemanticVersion.c_str(), validate, allow_insecure_https){};
212199

213-
214-
215200
template <typename T> void setPubKey( T* asset ) { _cfg.pub_key = (CryptoAsset*)asset; _cfg.check_sig = true; }
216201
template <typename T> void setRootCA( T* asset ) { _cfg.root_ca = (CryptoAsset*)asset; _cfg.unsafe = false; }
217202

218-
//template <class U> static U& getInstance() { static U updater; return updater; }
219-
220203
void forceUpdate(const char* firmwareHost, uint16_t firmwarePort, const char* firmwarePath, bool validate );
221204
void forceUpdate(const char* firmwareURL, bool validate );
222205
void forceUpdate(bool validate );

0 commit comments

Comments
 (0)