We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c43c852 commit 2b0c91aCopy full SHA for 2b0c91a
1 file changed
bitcoin/core/key.py
@@ -28,6 +28,13 @@
28
# this specifies the curve used with ECDSA.
29
_NID_secp256k1 = 714 # from openssl/obj_mac.h
30
31
+# test that openssl support secp256k1
32
+if _ssl.EC_KEY_new_by_curve_name(_NID_secp256k1) == 0:
33
+ errno = _ssl.ERR_get_error()
34
+ errmsg = ctypes.create_string_buffer(120)
35
+ _ssl.ERR_error_string_n(errno, errmsg, 120)
36
+ raise RuntimeError('openssl error: %s' % errmsg.value)
37
+
38
# Thx to Sam Devlin for the ctypes magic 64-bit fix.
39
def _check_result (val, func, args):
40
if val == 0:
0 commit comments