Implemented compatibility handling for AES-256 migration

This commit is contained in:
Mark Qvist 2025-05-06 12:08:17 +02:00
parent 5dc8cdc6dc
commit d7791c60e2
4 changed files with 64 additions and 26 deletions

View file

@ -418,7 +418,8 @@ class Destination:
else:
plaintext = self.decrypt(packet.data)
packet.ratchet_id = self.latest_ratchet_id
if plaintext != None:
if plaintext == None: return False
else:
if packet.packet_type == RNS.Packet.DATA:
if self.callbacks.packet != None:
try:
@ -426,6 +427,8 @@ class Destination:
except Exception as e:
RNS.log("Error while executing receive callback from "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)
return True
def incoming_link_request(self, data, packet):
if self.accept_link_requests:
link = RNS.Link.validate_request(self, data, packet)