fix old version of OpenSSL

This commit is contained in:
破娃酱 2017-05-17 20:13:17 +08:00
parent 85b6930d7d
commit d6e1f73c9f

View file

@ -67,8 +67,6 @@ def load_openssl():
def load_cipher(cipher_name): def load_cipher(cipher_name):
func_name = 'EVP_' + cipher_name.replace('-', '_') func_name = 'EVP_' + cipher_name.replace('-', '_')
if bytes != str:
func_name = str(func_name, 'utf-8')
cipher = getattr(libcrypto, func_name, None) cipher = getattr(libcrypto, func_name, None)
if cipher: if cipher:
cipher.restype = c_void_p cipher.restype = c_void_p