Skip to content

Commit c8573d1

Browse files
authored
Merge pull request #144 from BrentIO/Fix-reading-PEM-issue
Fixed issue where rootcastr was empty because size() hadn't yet been …
2 parents facd0ee + 7a5c177 commit c8573d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/esp32FOTA.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,14 +364,14 @@ bool esp32FOTA::setupHTTP( const char* url )
364364
log_e("A strict security context has been set but no RootCA was provided");
365365
return false;
366366
}
367-
rootcastr = _cfg.root_ca->get();
368367
if( _cfg.root_ca->size() == 0 ) {
369368
log_e("A strict security context has been set but an empty RootCA was provided");
370-
log_e("rootcastr=%s", rootcastr);
371369
return false;
372370
}
371+
rootcastr = _cfg.root_ca->get();
373372
if( !rootcastr ) {
374373
log_e("Unable to get RootCA, aborting");
374+
log_e("rootcastr=%s", rootcastr);
375375
return false;
376376
}
377377
log_d("Loading root_ca.pem");

0 commit comments

Comments
 (0)