Fix unhandled expcetion on invalid cert

This commit is contained in:
shortcutme 2017-04-12 00:31:37 +02:00
parent 1ee592f5b7
commit 4c7ff9bb53
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 9 additions and 4 deletions

View file

@ -331,7 +331,7 @@ def verify_message(address, signature, message):
def SetCompactSignature(pkey, hash, signature):
sig = base64.b64decode(signature)
if len(sig) != 65:
raise BaseException("Wrong encoding")
raise Exception("Wrong encoding")
nV = ord(sig[0])
if nV < 27 or nV >= 35:
return False