summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@twistedmatrix.com>2013-12-31 13:47:36 -0500
committerJean-Paul Calderone <exarkun@twistedmatrix.com>2013-12-31 13:47:36 -0500
commit9227c47ae5215f5cf0958a23f1172c6f02fbd5af (patch)
treeae8b7f79e11f65b4762565fd97e09126ee0748cd
parent68244728277b54501086ec4c388d0ee2be00525d (diff)
downloadpyopenssl-9227c47ae5215f5cf0958a23f1172c6f02fbd5af.tar.gz
Try to use cryptography here, too.
-rw-r--r--OpenSSL/test/util.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSSL/test/util.py b/OpenSSL/test/util.py
index b58a0f2..72e1a88 100644
--- a/OpenSSL/test/util.py
+++ b/OpenSSL/test/util.py
@@ -28,7 +28,7 @@ else:
return s.encode("charmap")
bytes = bytes
-from tls.c import api
+from OpenSSL._util import ffi, lib
class TestCase(TestCase):
"""
@@ -46,8 +46,8 @@ class TestCase(TestCase):
# Clean up some long-lived allocations so they won't be reported as
# memory leaks.
- api.CRYPTO_cleanup_all_ex_data()
- api.ERR_remove_thread_state(api.NULL)
+ lib.CRYPTO_cleanup_all_ex_data()
+ lib.ERR_remove_thread_state(ffi.NULL)
after = set(memdbg.heap)
if not after - before:
@@ -61,8 +61,8 @@ class TestCase(TestCase):
# Clean up some long-lived allocations so they won't be reported as
# memory leaks.
- api.CRYPTO_cleanup_all_ex_data()
- api.ERR_remove_thread_state(api.NULL)
+ libCRYPTO_cleanup_all_ex_data()
+ libERR_remove_thread_state(ffiNULL)
after = set(memdbg.heap)
@@ -146,7 +146,7 @@ class TestCase(TestCase):
allocs_accum = []
for (size, pointer) in allocs:
- addr = int(api.ffi.cast('uintptr_t', pointer))
+ addr = int(ffi.cast('uintptr_t', pointer))
allocs_accum.append("%d@0x%x" % (size, addr))
allocs_report = ", ".join(sorted(allocs_accum))