We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5ed261 commit 40b35a4Copy full SHA for 40b35a4
1 file changed
wolfssl/__init__.py
@@ -100,6 +100,12 @@ def __init__(self, session):
100
if self.native_object == _ffi.NULL:
101
raise SSLError("Unable to get internal WOLFSSL_X509 from wolfSSL")
102
103
+ def __del__(self):
104
+ if getattr(self, 'native_object', None) is not None \
105
+ and self.native_object != _ffi.NULL:
106
+ _lib.wolfSSL_X509_free(self.native_object)
107
+ self.native_object = _ffi.NULL
108
+
109
def get_subject_cn(self):
110
cnPtr = _lib.wolfSSL_X509_get_subjectCN(self.native_object)
111
if cnPtr == _ffi.NULL:
0 commit comments