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 {
90
90
std::vector<std::uint8_t > client_cert_pem;
91
91
std::vector<std::uint8_t > client_key_pem;
92
92
93
+ /* Used by cmds_ota */
94
+ std::vector<std::uint8_t > ota_cert_buf;
95
+
93
96
/* Used by cmds_preferences */
94
97
std::vector<std::uint8_t > pref_buf;
95
98
Original file line number Diff line number Diff line change @@ -27,15 +27,15 @@ void CAtHandler::add_cmds_ota() {
27
27
return chAT ::CommandStatus ::ERROR ;
28
28
}
29
29
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 ();
32
32
if (offset < ca_root_size ) {
33
- cert_buf .resize (ca_root_size );
33
+ ota_cert_buf .resize (ca_root_size );
34
34
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 );
36
36
} while (offset < ca_root_size );
37
37
}
38
- OTA .setCACert ((const char * )cert_buf .data ());
38
+ OTA .setCACert ((const char * )ota_cert_buf .data ());
39
39
srv .continue_read ();
40
40
return chAT ::CommandStatus ::OK ;
41
41
}
You can’t perform that action at this time.
0 commit comments