aboutsummaryrefslogtreecommitdiff
path: root/src/Identity.cpp
diff options
context:
space:
mode:
authorScott Powell <sqij@protonmail.com>2025-03-19 17:30:35 +1100
committerScott Powell <sqij@protonmail.com>2025-03-19 17:30:35 +1100
commit089ac96f2ba6eb3ea6eecbe4eae8aee0a85f2cb5 (patch)
tree223c0bd148fc1707379659b66fac042ab401a4dd /src/Identity.cpp
parent4943b388c0a247343ba7afe3e2062b35988e6147 (diff)
* verify() fix moved to Identity class
Diffstat (limited to 'src/Identity.cpp')
-rw-r--r--src/Identity.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Identity.cpp b/src/Identity.cpp
index e7c57d7e..138c66b7 100644
--- a/src/Identity.cpp
+++ b/src/Identity.cpp
@@ -2,6 +2,7 @@
#include <string.h>
#define ED25519_NO_SEED 1
#include <ed_25519.h>
+#include <Ed25519.h>
namespace mesh {
@@ -14,7 +15,12 @@ Identity::Identity(const char* pub_hex) {
}
bool Identity::verify(const uint8_t* sig, const uint8_t* message, int msg_len) const {
+#if 0
+ // NOTE: memory corruption bug was found in this function!!
return ed25519_verify(sig, message, msg_len, pub_key);
+#else
+ return Ed25519::verify(sig, this->pub_key, message, msg_len);
+#endif
}
bool Identity::readFrom(Stream& s) {