Skip to content
Snippets Groups Projects
Commit 7077a3d0 authored by inso's avatar inso
Browse files

Fixed a bug in Revokation

parent 36e4be7d
No related branches found
No related tags found
No related merge requests found
...@@ -116,9 +116,9 @@ class Revocation(Document): ...@@ -116,9 +116,9 @@ class Revocation(Document):
''' '''
super().__init__(version, currency, [signature]) super().__init__(version, currency, [signature])
@staticmethod def raw(self, selfcert):
def raw(): return """{0}META:REVOKE
return """META:REVOKE""" """.format(selfcert.signed_raw())
def sign(self, selfcert, keys): def sign(self, selfcert, keys):
''' '''
...@@ -127,6 +127,6 @@ class Revocation(Document): ...@@ -127,6 +127,6 @@ class Revocation(Document):
''' '''
self.signatures = [] self.signatures = []
for key in keys: for key in keys:
signing = base64.b64encode(key.signature(bytes(selfcert.signed_raw() + self.raw(), 'ascii'))) signing = base64.b64encode(key.signature(bytes(self.raw(selfcert), 'ascii')))
self.signatures.append(signing.decode("ascii")) self.signatures.append(signing.decode("ascii"))
...@@ -275,7 +275,7 @@ class Account(QObject): ...@@ -275,7 +275,7 @@ class Account(QObject):
key = SigningKey(self.salt, password) key = SigningKey(self.salt, password)
revocation.sign(selfcert, [key]) revocation.sign(selfcert, [key])
logging.debug("Self-Revocation Document : \n{0}".format(selfcert.signed_raw() + revocation.raw())) logging.debug("Self-Revocation Document : \n{0}".format(revocation.raw(selfcert)))
logging.debug("Signature : \n{0}".format(revocation.signatures[0])) logging.debug("Signature : \n{0}".format(revocation.signatures[0]))
data = { data = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment