Added link status check on identify

This commit is contained in:
Mark Qvist 2023-09-21 14:12:32 +02:00
parent bf726ed2c7
commit 7e34b61f37
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ class Link:
:param identity: An RNS.Identity instance to identify as. :param identity: An RNS.Identity instance to identify as.
""" """
if self.initiator: if self.initiator and self.status == Link.ACTIVE:
signed_data = self.link_id + identity.get_public_key() signed_data = self.link_id + identity.get_public_key()
signature = identity.sign(signed_data) signature = identity.sign(signed_data)
proof_data = identity.get_public_key() + signature proof_data = identity.get_public_key() + signature