]> www.wagner.pp.ru Git - oss/ctypescrypto.git/blobdiff - ctypescrypto/oid.py
Fix incompatibilities with OpenSSL 1.1.0
[oss/ctypescrypto.git] / ctypescrypto / oid.py
index ff1684613ce5c948ae42925cdd1e469991ebe05a..516c2e9e1331416209de3002d3b0a6f28fabe0a9 100644 (file)
@@ -133,8 +133,11 @@ def cleanup():
     """
     Removes all the objects, dynamically added by current
     application from database.
+
+    Note that in OpenSSL 1.1.0 and above OBJ_cleanup really does nothing
     """
-    libcrypto.OBJ_cleanup()
+    if hasattr(libcrypto,"OBJ_cleanup"):
+        libcrypto.OBJ_cleanup()
 
 libcrypto.OBJ_nid2sn.restype = c_char_p
 libcrypto.OBJ_nid2ln.restype = c_char_p