fixed missing import in crypto
parent
717035a136
commit
a376e583e6
|
@ -277,6 +277,10 @@ class OnionrCommunicate:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
creator = self._utils.getPeerByHashId(blockMetadata['id'])
|
creator = self._utils.getPeerByHashId(blockMetadata['id'])
|
||||||
|
try:
|
||||||
|
creator = creator.decode()
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
if self._core._crypto.edVerify(blockContent.split(b'}')[1], creator, blockMetadata['sig'], encodedData=True):
|
if self._core._crypto.edVerify(blockContent.split(b'}')[1], creator, blockMetadata['sig'], encodedData=True):
|
||||||
self._core.updateBlockInfo(i, 'sig', 'true')
|
self._core.updateBlockInfo(i, 'sig', 'true')
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -336,7 +336,8 @@ class OnionrUtils:
|
||||||
metadata = {}
|
metadata = {}
|
||||||
try:
|
try:
|
||||||
sig = json.loads(data[0].strip() + '}')['sig']
|
sig = json.loads(data[0].strip() + '}')['sig']
|
||||||
signer = self._core._utils.getPeerByHashId(metadata['id'])
|
sigID = json.loads(data[0].strip() + '}')['id']
|
||||||
|
signer = self._core._utils.getPeerByHashId(sigID)
|
||||||
logger.debug('signer ' + signer)
|
logger.debug('signer ' + signer)
|
||||||
logger.debug('signature ' + metadata['sig'])
|
logger.debug('signature ' + metadata['sig'])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in New Issue