Wessel Nieboer
5 months ago
No known key found for this signature in database
GPG Key ID: 929C8E45E33B5FD2
1 changed files with
1 additions and
1 deletions
-
src/helpers/BaseChatMesh.cpp
|
|
|
@ -1169,7 +1169,7 @@ uint16_t BaseChatMesh::getEncryptionNonceFor(const ContactInfo& contact) { |
|
|
|
uint16_t nonce = 0; |
|
|
|
auto entry = findSessionKey(contact.id.pub_key); |
|
|
|
if (canUseSessionKey(entry)) { |
|
|
|
++entry->nonce; |
|
|
|
++entry->nonce; // may reach 65535 → canUseSessionKey() fails next call → falls back to static ECDH
|
|
|
|
if (entry->sends_since_last_recv < 255) entry->sends_since_last_recv++; |
|
|
|
session_keys_dirty = true; |
|
|
|
nonce = entry->nonce; |
|
|
|
|