diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2017-12-18 10:24:17 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-12-18 09:24:17 -0600 |
commit | 5db4e5e77ee40521cd732058262e228be4430588 (patch) | |
tree | 81d3dfa9f9a3066f45dbc7155f2108854561b3ca /tests/hazmat/backends/test_openssl.py | |
parent | 582b2b4d85c4bb902beab05fb3044d96c49c910f (diff) | |
download | cryptography-5db4e5e77ee40521cd732058262e228be4430588.tar.gz cryptography-5db4e5e77ee40521cd732058262e228be4430588.tar.bz2 cryptography-5db4e5e77ee40521cd732058262e228be4430588.zip |
Fixed #4058 -- use the thread-safe API from OpenSSL, not the danger one (#4059)
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 6 |
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) |