mirror of
https://github.com/meshtastic/firmware.git
synced 2026-09-19 12:29:03 -04:00
XEdDSA packet signing UI (BaseUI) (#10841)
* XEdDSA packet signing UI (BaseUI) * Move Pixels around for TFT
This commit is contained in:
1 parent
43440dbb9b
commit
f273d3f875
5 files changed
+50
-4
No files matched your search
@@ -183,6 +183,10 @@ const StoredMessage &MessageStore::addFromPacket(const meshtastic_MeshPacket &pa
|
||||
sm.type = isDM ? MessageType::DM_TO_US : MessageType::BROADCAST;
|
||||
sm.ackStatus = (packet.from == 0) ? AckStatus::NONE : AckStatus::ACKED;
|
||||
|
||||
#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN || MESHTASTIC_EXCLUDE_PKI)
|
||||
sm.xeddsaSigned = packet.xeddsa_signed;
|
||||
#endif
|
||||
|
||||
addLiveMessage(sm);
|
||||
|
||||
#if ENABLE_MESSAGE_PERSISTENCE
|
||||
@@ -230,6 +234,7 @@ struct __attribute__((packed)) StoredMessageRecord {
|
||||
uint8_t isBootRelative;
|
||||
uint8_t ackStatus; // static_cast<uint8_t>(AckStatus)
|
||||
uint8_t type; // static_cast<uint8_t>(MessageType)
|
||||
uint8_t xeddsaSigned; // 1 if packet carried a verified XEdDSA signature
|
||||
uint16_t textLength; // message length
|
||||
char text[MAX_MESSAGE_SIZE]; // store actual text here
|
||||
};
|
||||
@@ -245,6 +250,7 @@ static inline void writeMessageRecord(SafeFile &f, const StoredMessage &m)
|
||||
rec.isBootRelative = m.isBootRelative;
|
||||
rec.ackStatus = static_cast<uint8_t>(m.ackStatus);
|
||||
rec.type = static_cast<uint8_t>(m.type);
|
||||
rec.xeddsaSigned = m.xeddsaSigned ? 1 : 0;
|
||||
rec.textLength = m.textLength;
|
||||
|
||||
// Copy the actual text into the record from RAM pool
|
||||
@@ -269,6 +275,7 @@ static inline bool readMessageRecord(File &f, StoredMessage &m)
|
||||
m.isBootRelative = rec.isBootRelative;
|
||||
m.ackStatus = static_cast<AckStatus>(rec.ackStatus);
|
||||
m.type = static_cast<MessageType>(rec.type);
|
||||
m.xeddsaSigned = rec.xeddsaSigned != 0;
|
||||
m.textLength = rec.textLength;
|
||||
|
||||
// 💡 Re-store text into pool and update offset
|
||||
|
||||
Reference in new issue
Block a user