Merge pull request #913 from meshtastic/keymatch-debugging

Keymatch debugging
This commit is contained in:
Garth Vander Houwen 2024-09-03 11:17:45 -07:00 committed by GitHub
commit 6d97cf0aae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 20 deletions

View file

@ -15388,9 +15388,6 @@
},
"Never" : {
},
"New Key%@" : {
},
"Newer firmware is available" : {
@ -16758,9 +16755,6 @@
},
"Public Key Mismatch" : {
},
"Public Key%@" : {
},
"PWD" : {
@ -21127,6 +21121,9 @@
},
"The minimum distance change in meters to be considered for a smart position broadcast." : {
},
"The most recent public key for this node does not match the previously recorded key. You can delete the node and let it exchange keys again, but this also may indicate a more serious security problem. Contact the user through another trusted channel to determine if the key change was due to a factory reset or other intentional action." : {
},
"The public key authorized to send admin messages to this node." : {

View file

@ -632,11 +632,6 @@ func routingPacket (packet: MeshPacket, connectedNodeNum: Int64, context: NSMana
}
}
fetchedMessage[0].ackError = Int32(routingMessage.errorReason.rawValue)
if routingError == RoutingError.pkiFailed {
fetchedMessage[0].toUser?.keyMatch = false
fetchedMessage[0].toUser?.newPublicKey = fetchedMessage[0].publicKey
}
if routingMessage.errorReason == Routing.Error.none {
fetchedMessage[0].receivedACK = true

View file

@ -51,15 +51,9 @@ struct NodeDetail: View {
Text("Public Key Mismatch")
.font(.title3)
.foregroundStyle(.red)
Text("The public key does not match the recorded key. You may delete the node and let it exchange keys again, but this may indicate a more serious security problem. Contact the user through another trusted channel, to determine if the key change was due to a factory reset or other intentional action.")
.font(.caption)
.foregroundStyle(.red)
Text("Public Key\(user.publicKey?.base64EncodedString() ?? "Empty Key")")
.monospaced()
.allowsTightening(/*@START_MENU_TOKEN@*/true/*@END_MENU_TOKEN@*/)
Text("New Key\(user.newPublicKey?.base64EncodedString() ?? "Empty Key")")
.monospaced()
.allowsTightening(/*@START_MENU_TOKEN@*/true/*@END_MENU_TOKEN@*/)
Text("The most recent public key for this node does not match the previously recorded key. You can delete the node and let it exchange keys again, but this also may indicate a more serious security problem. Contact the user through another trusted channel to determine if the key change was due to a factory reset or other intentional action.")
.foregroundStyle(.secondary)
.font(.callout)
}
} icon: {
Image(systemName: "key.slash.fill")