From b2409b3ad9980fb2783bf6d48080aa7a8d3bb29f Mon Sep 17 00:00:00 2001 From: wizard of ozzie Date: Wed, 19 Aug 2015 18:53:10 +1000 Subject: [PATCH 1/2] Fixed key.py Fixed Verify: lowercase "false" needs capitalisation --- bitcoin/core/key.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/core/key.py b/bitcoin/core/key.py index 617a6234..a3893feb 100644 --- a/bitcoin/core/key.py +++ b/bitcoin/core/key.py @@ -217,7 +217,7 @@ def signature_to_low_s(self, sig): def verify(self, hash, sig): """Verify a DER signature""" if not sig: - return false + return False # New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first. norm_sig = ctypes.c_void_p(0) From 6f70dae68ad29192f71ebe2c49cc90d9d8c710fc Mon Sep 17 00:00:00 2001 From: wizard of ozzie Date: Wed, 19 Aug 2015 18:59:25 +1000 Subject: [PATCH 2/2] Update key.py Fixed 2x "return false" --- bitcoin/core/key.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/core/key.py b/bitcoin/core/key.py index a3893feb..b6f06193 100644 --- a/bitcoin/core/key.py +++ b/bitcoin/core/key.py @@ -226,7 +226,7 @@ def verify(self, hash, sig): derlen = _ssl.i2d_ECDSA_SIG(norm_sig, 0) if derlen == 0: _ssl.ECDSA_SIG_free(norm_sig) - return false + return False norm_der = ctypes.create_string_buffer(derlen) _ssl.i2d_ECDSA_SIG(norm_sig, ctypes.byref(ctypes.pointer(norm_der)))