From 9e8aa1c56ae4630fb3fce89cafe6cae78cdd8d82 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Sat, 11 Oct 2014 00:37:29 +0800 Subject: [PATCH] fix libcrypto on Windows --- shadowsocks/crypto/ctypes_openssl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shadowsocks/crypto/ctypes_openssl.py b/shadowsocks/crypto/ctypes_openssl.py index 7821d5b..9c8386b 100644 --- a/shadowsocks/crypto/ctypes_openssl.py +++ b/shadowsocks/crypto/ctypes_openssl.py @@ -56,6 +56,8 @@ def load_openssl(): libcrypto.EVP_CIPHER_CTX_cleanup.argtypes = (c_void_p,) libcrypto.EVP_CIPHER_CTX_free.argtypes = (c_void_p,) + if hasattr(libcrypto, 'OpenSSL_add_all_ciphers'): + libcrypto.OpenSSL_add_all_ciphers() buf = create_string_buffer(buf_size) loaded = True