replace EVP_CIPHER_CTX_cleanup with EVP_CIPHER_CTX_reset
This commit is contained in:
parent
5b450acfaa
commit
edfc133059
1 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ def load_openssl():
|
||||||
libcrypto.EVP_CipherUpdate.argtypes = (c_void_p, c_void_p, c_void_p,
|
libcrypto.EVP_CipherUpdate.argtypes = (c_void_p, c_void_p, c_void_p,
|
||||||
c_char_p, c_int)
|
c_char_p, c_int)
|
||||||
|
|
||||||
libcrypto.EVP_CIPHER_CTX_cleanup.argtypes = (c_void_p,)
|
libcrypto.EVP_CIPHER_CTX_reset.argtypes = (c_void_p,)
|
||||||
libcrypto.EVP_CIPHER_CTX_free.argtypes = (c_void_p,)
|
libcrypto.EVP_CIPHER_CTX_free.argtypes = (c_void_p,)
|
||||||
if hasattr(libcrypto, 'OpenSSL_add_all_ciphers'):
|
if hasattr(libcrypto, 'OpenSSL_add_all_ciphers'):
|
||||||
libcrypto.OpenSSL_add_all_ciphers()
|
libcrypto.OpenSSL_add_all_ciphers()
|
||||||
|
@ -108,7 +108,7 @@ class OpenSSLCrypto(object):
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
if self._ctx:
|
if self._ctx:
|
||||||
libcrypto.EVP_CIPHER_CTX_cleanup(self._ctx)
|
libcrypto.EVP_CIPHER_CTX_reset(self._ctx)
|
||||||
libcrypto.EVP_CIPHER_CTX_free(self._ctx)
|
libcrypto.EVP_CIPHER_CTX_free(self._ctx)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue