From ebd5a565ed0e9fe5313ecf514739d1240d697e04 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 9 Sep 2015 18:15:38 +0200 Subject: [PATCH] fix: add missing definition of sha1 --- lib/paymentrequest.py | 1 + lib/rsakey.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/paymentrequest.py b/lib/paymentrequest.py index f2dbfe299..88ed2589c 100644 --- a/lib/paymentrequest.py +++ b/lib/paymentrequest.py @@ -128,6 +128,7 @@ class PaymentRequest: try: x, ca = verify_cert_chain(cert.certificate) except BaseException as e: + traceback.print_exc(file=sys.stderr) self.error = str(e) return False # get requestor name diff --git a/lib/rsakey.py b/lib/rsakey.py index 892c05435..d5ad96e66 100644 --- a/lib/rsakey.py +++ b/lib/rsakey.py @@ -14,10 +14,15 @@ import os import math import base64 import binascii +import hashlib from pem import * +def SHA1(x): + return hashlib.sha1(x).digest() + + # ************************************************************************** # PRNG Functions # **************************************************************************