File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,9 @@ class CAtHandler {
9090 std::vector<std::uint8_t > client_cert_pem;
9191 std::vector<std::uint8_t > client_key_pem;
9292
93+ /* Used by cmds_ota */
94+ std::vector<std::uint8_t > ota_cert_buf;
95+
9396 /* Used by cmds_preferences */
9497 std::vector<std::uint8_t > pref_buf;
9598
Original file line number Diff line number Diff line change @@ -27,15 +27,15 @@ void CAtHandler::add_cmds_ota() {
2727 return chAT ::CommandStatus ::ERROR ;
2828 }
2929
30- cert_buf = srv .inhibit_read (ca_root_size );
31- size_t offset = cert_buf .size ();
30+ ota_cert_buf = srv .inhibit_read (ca_root_size );
31+ size_t offset = ota_cert_buf .size ();
3232 if (offset < ca_root_size ) {
33- cert_buf .resize (ca_root_size );
33+ ota_cert_buf .resize (ca_root_size );
3434 do {
35- offset += serial -> read (cert_buf .data () + offset , ca_root_size - offset );
35+ offset += serial -> read (ota_cert_buf .data () + offset , ca_root_size - offset );
3636 } while (offset < ca_root_size );
3737 }
38- OTA .setCACert ((const char * )cert_buf .data ());
38+ OTA .setCACert ((const char * )ota_cert_buf .data ());
3939 srv .continue_read ();
4040 return chAT ::CommandStatus ::OK ;
4141 }
You can’t perform that action at this time.
0 commit comments