Skip to content

Commit

Permalink
Merge pull request #144 from BrentIO/Fix-reading-PEM-issue
Browse files Browse the repository at this point in the history
Fixed issue where rootcastr was empty because size() hadn't yet been …
  • Loading branch information
tobozo committed Apr 4, 2024
2 parents facd0ee + 7a5c177 commit c8573d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/esp32FOTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,14 @@ bool esp32FOTA::setupHTTP( const char* url )
log_e("A strict security context has been set but no RootCA was provided");
return false;
}
rootcastr = _cfg.root_ca->get();
if( _cfg.root_ca->size() == 0 ) {
log_e("A strict security context has been set but an empty RootCA was provided");
log_e("rootcastr=%s", rootcastr);
return false;
}
rootcastr = _cfg.root_ca->get();
if( !rootcastr ) {
log_e("Unable to get RootCA, aborting");
log_e("rootcastr=%s", rootcastr);
return false;
}
log_d("Loading root_ca.pem");
Expand Down

0 comments on commit c8573d1

Please sign in to comment.