mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* added CommonCLI::saveIdentity()
This commit is contained in:
parent
c28001d1e2
commit
ee194a7b19
6 changed files with 47 additions and 1 deletions
|
|
@ -305,7 +305,9 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
|
|||
uint8_t prv_key[PRV_KEY_SIZE];
|
||||
bool success = mesh::Utils::fromHex(prv_key, PRV_KEY_SIZE, &config[8]);
|
||||
if (success) {
|
||||
_callbacks->getSelfId().readFrom(prv_key, PRV_KEY_SIZE);
|
||||
mesh::LocalIdentity new_id;
|
||||
new_id.readFrom(prv_key, PRV_KEY_SIZE);
|
||||
_callbacks->saveIdentity(new_id);
|
||||
strcpy(reply, "OK");
|
||||
} else {
|
||||
strcpy(reply, "Error, invalid key");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue