Revert "fix beacon: init Ed25519 identity for valid advert signature"
This reverts commit d487b84926.
This commit is contained in:
15
src/main.cpp
15
src/main.cpp
@@ -351,21 +351,6 @@ void setup() {
|
|||||||
|
|
||||||
fast_rng.begin(radio_driver.getRngSeed());
|
fast_rng.begin(radio_driver.getRngSeed());
|
||||||
|
|
||||||
{
|
|
||||||
File f = InternalFS.open(IDENTITY_FILE, FILE_O_READ);
|
|
||||||
if (f) {
|
|
||||||
uint8_t buf[PUB_KEY_SIZE + PRV_KEY_SIZE];
|
|
||||||
if (f.read(buf, sizeof(buf)) == sizeof(buf)) the_mesh.self_id.readFrom(buf, sizeof(buf));
|
|
||||||
f.close();
|
|
||||||
} else {
|
|
||||||
the_mesh.self_id = mesh::LocalIdentity(&fast_rng);
|
|
||||||
uint8_t buf[PUB_KEY_SIZE + PRV_KEY_SIZE];
|
|
||||||
the_mesh.self_id.writeTo(buf, sizeof(buf));
|
|
||||||
f = InternalFS.open(IDENTITY_FILE, FILE_O_WRITE);
|
|
||||||
if (f) { f.write(buf, sizeof(buf)); f.close(); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
the_mesh.setup_channel();
|
the_mesh.setup_channel();
|
||||||
the_mesh.begin();
|
the_mesh.begin();
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,6 @@
|
|||||||
#define CONFIG_FILE "/security.cfg"
|
#define CONFIG_FILE "/security.cfg"
|
||||||
#define CHANNEL_FILE "/channel.cfg"
|
#define CHANNEL_FILE "/channel.cfg"
|
||||||
#define NAME_FILE "/name.cfg"
|
#define NAME_FILE "/name.cfg"
|
||||||
#define IDENTITY_FILE "/identity.dat"
|
|
||||||
#define WDT_TIMEOUT_MS 10000
|
#define WDT_TIMEOUT_MS 10000
|
||||||
|
|
||||||
#include <RadioLib.h>
|
#include <RadioLib.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user