Skip to content
Snippets Groups Projects
Commit 6d63c82d authored by Abdullah Bin Zubair's avatar Abdullah Bin Zubair
Browse files

Error fix for generate_self_concise_attestation

parent 958d9489
No related branches found
No related tags found
No related merge requests found
......@@ -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
##############################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment