aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2015-03-25 15:38:55 +0000
committerAlex Stapleton <alexs@prol.etari.at>2015-03-25 15:38:55 +0000
commit44a838ce65f79d6432640ab32e12cd8781c94912 (patch)
tree1d9773f42cf67ea089c53c0d4fe4f1bedb1fd62c /tests
parent92dd70b2c21dd0392f01438488a833221d16a611 (diff)
parent51924aa151e03d8c2adcb40c08ca5a39b566e7c5 (diff)
downloadcryptography-44a838ce65f79d6432640ab32e12cd8781c94912.tar.gz
cryptography-44a838ce65f79d6432640ab32e12cd8781c94912.tar.bz2
cryptography-44a838ce65f79d6432640ab32e12cd8781c94912.zip
Merge pull request #1780 from reaperhulk/allow-zero-bn
allow zero value bn using _bn_to_int in the openssl backend
Diffstat (limited to 'tests')
-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):