From 51924aa151e03d8c2adcb40c08ca5a39b566e7c5 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Wed, 25 Mar 2015 00:15:09 -0500 Subject: allow zero value bn using _bn_to_int in the openssl backend --- tests/hazmat/backends/test_openssl.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/hazmat/backends/test_openssl.py') 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): -- cgit v1.2.3