aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_openssl.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r--tests/hazmat/backends/test_openssl.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index e430e2d9..58631490 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -125,9 +125,9 @@ class TestOpenSSL(object):
assert cipher != backend._ffi.NULL
def test_error_strings_loaded(self):
- # returns a value in a static buffer
- err = backend._lib.ERR_error_string(101183626, backend._ffi.NULL)
- assert b"data not multiple of block length" in backend._ffi.string(err)
+ buf = backend._ffi.new("char[]", 256)
+ backend._lib.ERR_error_string_n(101183626, buf, len(buf))
+ assert b"data not multiple of block length" in backend._ffi.string(buf)
def test_unknown_error_in_cipher_finalize(self):
cipher = Cipher(AES(b"\0" * 16), CBC(b"\0" * 16), backend=backend)