From 85b6930d7d0f54c59be3dbb39f5568392377304b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Wed, 17 May 2017 19:59:48 +0800 Subject: [PATCH] fix old version of OpenSSL ignore warning --- shadowsocks/crypto/openssl.py | 3 +-- shadowsocks/shell.py | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/shadowsocks/crypto/openssl.py b/shadowsocks/crypto/openssl.py index 24264f1..aa11759 100644 --- a/shadowsocks/crypto/openssl.py +++ b/shadowsocks/crypto/openssl.py @@ -89,8 +89,7 @@ class OpenSSLCrypto(object): self._ctx = None if not loaded: load_openssl() - cipher_name = common.to_bytes(cipher_name) - cipher = libcrypto.EVP_get_cipherbyname(cipher_name) + cipher = libcrypto.EVP_get_cipherbyname(common.to_bytes(cipher_name)) if not cipher: cipher = load_cipher(cipher_name) if not cipher: diff --git a/shadowsocks/shell.py b/shadowsocks/shell.py index f0e0cb0..6246d98 100755 --- a/shadowsocks/shell.py +++ b/shadowsocks/shell.py @@ -111,12 +111,6 @@ def check_config(config, is_local): if config.get('server', '') in ['127.0.0.1', 'localhost']: logging.warning('warning: server set to listen on %s:%s, are you sure?' % (to_str(config['server']), config['server_port'])) - if (config.get('method', '') or '').lower() == 'table': - logging.warning('warning: table is not safe; please use a safer cipher, ' - 'like AES-256-CFB') - if (config.get('method', '') or '').lower() == 'rc4': - logging.warning('warning: RC4 is not safe; please use a safer cipher, ' - 'like AES-256-CFB') if config.get('timeout', 300) < 100: logging.warning('warning: your timeout %d seems too short' % int(config.get('timeout')))