catch signature failure better

master
Kevin Froman 2018-09-26 18:40:33 -05:00
parent 1a856c365f
commit 8dbaac2198
1 changed files with 3 additions and 0 deletions

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: