X-Git-Url: https://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=ctypescrypto%2Foid.py;fp=ctypescrypto%2Foid.py;h=516c2e9e1331416209de3002d3b0a6f28fabe0a9;hb=6c34e2a01664aeb3a5a14f7a79e76b394349b672;hp=ff1684613ce5c948ae42925cdd1e469991ebe05a;hpb=2d25cc2098be9bac1fe8f16751a121b89f25504e;p=oss%2Fctypescrypto.git diff --git a/ctypescrypto/oid.py b/ctypescrypto/oid.py index ff16846..516c2e9 100644 --- a/ctypescrypto/oid.py +++ b/ctypescrypto/oid.py @@ -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