catch signature failure better
This commit is contained in:
parent
1a856c365f
commit
8dbaac2198
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user