[pypy-commit] pypy openssl-1.1: Fix to use properly the new openssl-1.1 interface in this test

arigo pypy.commits at gmail.com
Sat Oct 29 14:31:36 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: openssl-1.1
Changeset: r87990:5afeac80c292
Date: 2016-10-29 20:31 +0200
http://bitbucket.org/pypy/pypy/changeset/5afeac80c292/

Log:	Fix to use properly the new openssl-1.1 interface in this test

diff --git a/rpython/translator/c/test/test_newgc.py b/rpython/translator/c/test/test_newgc.py
--- a/rpython/translator/c/test/test_newgc.py
+++ b/rpython/translator/c/test/test_newgc.py
@@ -1575,16 +1575,13 @@
 
         class A:
             def __init__(self):
-                self.ctx = lltype.malloc(ropenssl.EVP_MD_CTX.TO,
-                    flavor='raw')
                 digest = ropenssl.EVP_get_digestbyname('sha1')
+                self.ctx = ropenssl.EVP_MD_CTX_new()
                 ropenssl.EVP_DigestInit(self.ctx, digest)
                 rgc.add_memory_pressure(ropenssl.HASH_MALLOC_SIZE + 64)
 
             def __del__(self):
-                #ropenssl.EVP_MD_CTX_cleanup(self.ctx) -- disappeared in
-                # the refactoring to openssl 1.1, and not important here
-                lltype.free(self.ctx, flavor='raw')
+                ropenssl.EVP_MD_CTX_free(self.ctx)
         #A() --- can't call it here?? get glibc crashes on tannit64
         def f():
             am1 = am2 = am3 = None


More information about the pypy-commit mailing list