From 6d63c82daaac5490e3375ab835a08cd60b3cf14b Mon Sep 17 00:00:00 2001 From: Abdullah Bin Zubair <abdzu618@student.liu.se> Date: Fri, 16 Dec 2022 16:52:33 +0000 Subject: [PATCH] Error fix for generate_self_concise_attestation --- iroha-drip-general-master/drippy/host_identity.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/iroha-drip-general-master/drippy/host_identity.py b/iroha-drip-general-master/drippy/host_identity.py index ab62ac0..fbc7148 100644 --- a/iroha-drip-general-master/drippy/host_identity.py +++ b/iroha-drip-general-master/drippy/host_identity.py @@ -74,6 +74,15 @@ class HostIdentity: sign_key = SigningKey(unhexlify(self._priv_key)) return hexlify(sign_key.sign(unhexlify(message))) + def generate_self_concise_attestation(self, expiration): + if expiration <= astm_time(): + print("expiration timestamp has already expired.") + return None + + message = self._hhit + "{:>08x}".format(convert_be_to_le(expiration)) + sign_key = SigningKey(unhexlify(self._priv_key)) + return hexlify(sign_key.sign(unhexlify(message))) + ############################## ## Function for DRIP_Wrapper ############################## -- GitLab