catch signature failure better

This commit is contained in:
Kevin Froman 2018-09-26 18:40:33 -05:00
parent 1a856c365f
commit 8dbaac2198

View File

@ -78,6 +78,9 @@ class OnionrCrypto:
except nacl.exceptions.ValueError: except nacl.exceptions.ValueError:
logger.warn('Signature by unknown key (cannot reverse hash)') logger.warn('Signature by unknown key (cannot reverse hash)')
return False return False
except binascii.Error:
logger.warn('Could not load key for verification, invalid padding')
return False
retData = False retData = False
sig = base64.b64decode(sig) sig = base64.b64decode(sig)
try: try: