From 8dbaac21980e73075fbb2e7663e10901bd4be99a Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Wed, 26 Sep 2018 18:40:33 -0500 Subject: [PATCH] catch signature failure better --- onionr/onionrcrypto.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/onionr/onionrcrypto.py b/onionr/onionrcrypto.py index 340f8530..8953bf8f 100644 --- a/onionr/onionrcrypto.py +++ b/onionr/onionrcrypto.py @@ -78,6 +78,9 @@ class OnionrCrypto: except nacl.exceptions.ValueError: logger.warn('Signature by unknown key (cannot reverse hash)') return False + except binascii.Error: + logger.warn('Could not load key for verification, invalid padding') + return False retData = False sig = base64.b64decode(sig) try: