From 52a0447fea03e0313de486a29ff3fe1bf1c99fc4 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 9 May 2023 22:12:49 +0200 Subject: [PATCH] Fixed resent packets not getting repacked --- RNS/Packet.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/RNS/Packet.py b/RNS/Packet.py index 53c61ff..82a056a 100755 --- a/RNS/Packet.py +++ b/RNS/Packet.py @@ -172,8 +172,8 @@ class Packet: # Packet proofs over links are not encrypted self.ciphertext = self.data elif self.context == Packet.RESOURCE: - # A resource takes care of symmetric - # encryption by itself + # A resource takes care of encryption + # by itself self.ciphertext = self.data elif self.context == Packet.KEEPALIVE: # Keepalive packets contain no actual @@ -276,6 +276,10 @@ class Packet: :returns: A :ref:`RNS.PacketReceipt` instance if *create_receipt* was set to *True* when the packet was instantiated, if not returns *None*. If the packet could not be sent *False* is returned. """ if self.sent: + # Re-pack the packet to obtain new ciphertext for + # encrypted destinations + self.pack() + if RNS.Transport.outbound(self): return self.receipt else: