mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-10-26 19:01:53 -04:00
Cache announce signature validation
This commit is contained in:
parent
516cb106c1
commit
d044db2931
2 changed files with 5 additions and 2 deletions
|
|
@ -556,7 +556,8 @@ class Identity:
|
|||
if signal_blackholed: return "blackholed"
|
||||
else: return False
|
||||
|
||||
if announced_identity.pub != None and announced_identity.validate(signature, signed_data):
|
||||
if announced_identity.pub != None and (packet.announce_signature_validated or announced_identity.validate(signature, signed_data)):
|
||||
packet.announce_signature_validated = True
|
||||
if only_validate_signature:
|
||||
del announced_identity
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -117,7 +117,8 @@ class Packet:
|
|||
__slots__ = "hops", "header", "header_type", "packet_type", "transport_type", "context", "context_flag", "destination"
|
||||
__slots__ += "transport_id", "data", "flags", "raw", "packed", "sent", "create_receipt", "receipt", "fromPacked", "MTU"
|
||||
__slots__ += "sent_at", "packet_hash", "ratchet_id", "attached_interface", "receiving_interface", "rssi", "snr", "q"
|
||||
__slots__ += "ciphertext", "plaintext", "destination_hash", "destination_type", "link", "map_hash", "is_outbound_pr", "traffic_class"
|
||||
__slots__ += "ciphertext", "plaintext", "destination_hash", "destination_type", "link", "map_hash", "is_outbound_pr"
|
||||
__slots__ += "traffic_class", "announce_signature_validated"
|
||||
|
||||
def __init__(self, destination, data, packet_type = DATA, context = NONE, transport_type = RNS.Transport.BROADCAST,
|
||||
header_type = HEADER_1, transport_id = None, attached_interface = None, create_receipt = True, context_flag=FLAG_UNSET):
|
||||
|
|
@ -160,6 +161,7 @@ class Packet:
|
|||
self.ratchet_id = None
|
||||
|
||||
self.traffic_class = None
|
||||
self.announce_signature_validated = None
|
||||
self.attached_interface = attached_interface
|
||||
self.receiving_interface = None
|
||||
self.is_outbound_pr = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue