Wessel Nieboer
6 months ago
No known key found for this signature in database
GPG Key ID: 929C8E45E33B5FD2
2 changed files with
3 additions and
3 deletions
-
src/Mesh.cpp
-
src/helpers/BaseChatMesh.cpp
|
|
|
@ -145,7 +145,7 @@ DispatcherAction Mesh::onRecvPacket(Packet* pkt) { |
|
|
|
// FUTURE: could send back multiple paths, using createPathReturn(), and let sender choose which to use(?)
|
|
|
|
|
|
|
|
if (self_id.isHashMatch(&dest_hash)) { |
|
|
|
// scan contacts DB, for all matching hashes of 'src_hash' (max 4 matches supported ATM)
|
|
|
|
// scan contacts DB, for all matching hashes of 'src_hash' (max 8 matches supported ATM)
|
|
|
|
int num = searchPeersByHash(&src_hash); |
|
|
|
// for each matching contact, try to decrypt data
|
|
|
|
bool found = false; |
|
|
|
|
|
|
|
@ -1208,7 +1208,7 @@ bool BaseChatMesh::shouldInitiateSessionKey(const ContactInfo& contact) { |
|
|
|
if (!(contact.flags & CONTACT_FLAG_AEAD)) return false; |
|
|
|
|
|
|
|
// Need a known path to send the request
|
|
|
|
if (contact.out_path_len < 0) return false; |
|
|
|
if (contact.out_path_len == OUT_PATH_UNKNOWN) return false; |
|
|
|
|
|
|
|
auto entry = findSessionKey(contact.id.pub_key); |
|
|
|
|
|
|
|
@ -1443,9 +1443,9 @@ void BaseChatMesh::onSessionKeyDecryptSuccess(int peer_idx) { |
|
|
|
if (changed) { |
|
|
|
memset(entry->prev_session_key, 0, SESSION_KEY_SIZE); |
|
|
|
entry->state = SESSION_STATE_ACTIVE; |
|
|
|
onSessionKeysUpdated(); |
|
|
|
} |
|
|
|
entry->sends_since_last_recv = 0; |
|
|
|
if (changed) onSessionKeysUpdated(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|