aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_openssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-09-21 19:59:43 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2016-09-21 20:59:43 -0400
commiteba71712349f275bec51e3176c51ecbfa883e066 (patch)
treeddd08fdf44512de9e0abd582fcb29611f393058c /tests/hazmat/backends/test_openssl.py
parenta5865d9b630df7586785b683ed145b977ad7e0c4 (diff)
downloadcryptography-eba71712349f275bec51e3176c51ecbfa883e066.tar.gz
cryptography-eba71712349f275bec51e3176c51ecbfa883e066.tar.bz2
cryptography-eba71712349f275bec51e3176c51ecbfa883e066.zip
fix warnings in cffi 1.8.3 due to wrong buffer types (#3155)
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r--tests/hazmat/backends/test_openssl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 4ec8d84e..bf794c3a 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -182,7 +182,7 @@ class TestOpenSSL(object):
assert size == length
return sample_data
monkeypatch.setattr(os, "urandom", notrandom)
- buf = backend._ffi.new("char[]", length)
+ buf = backend._ffi.new("unsigned char[]", length)
backend._lib.RAND_bytes(buf, length)
assert backend._ffi.buffer(buf)[0:length] == sample_data
@@ -247,7 +247,7 @@ class TestOpenSSLRandomEngine(object):
def test_osrandom_sanity_check(self):
# This test serves as a check against catastrophic failure.
- buf = backend._ffi.new("char[]", 500)
+ buf = backend._ffi.new("unsigned char[]", 500)
res = backend._lib.RAND_bytes(buf, 500)
assert res == 1
assert backend._ffi.buffer(buf)[:] != "\x00" * 500