aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_openssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-03-25 00:15:09 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-03-25 09:02:28 -0500
commit51924aa151e03d8c2adcb40c08ca5a39b566e7c5 (patch)
treeffd09a419556671eabb5ebe6f1d783ff9b63c5ed /tests/hazmat/backends/test_openssl.py
parentb6e094d475cc8456adac9e10b3095e2883dcc3ee (diff)
downloadcryptography-51924aa151e03d8c2adcb40c08ca5a39b566e7c5.tar.gz
cryptography-51924aa151e03d8c2adcb40c08ca5a39b566e7c5.tar.bz2
cryptography-51924aa151e03d8c2adcb40c08ca5a39b566e7c5.zip
allow zero value bn using _bn_to_int in the openssl backend
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r--tests/hazmat/backends/test_openssl.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 73316f8a..867c5dd6 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -210,6 +210,10 @@ class TestOpenSSL(object):
assert bn == bn_ptr
assert backend._bn_to_int(bn_ptr) == value
+ def test_bn_to_int(self):
+ bn = backend._int_to_bn(0)
+ assert backend._bn_to_int(bn) == 0
+
class TestOpenSSLRandomEngine(object):
def teardown_method(self, method):