diff --git a/shadowsocks/crypto/openssl.py b/shadowsocks/crypto/openssl.py index 7bce8b3..6d4d154 100644 --- a/shadowsocks/crypto/openssl.py +++ b/shadowsocks/crypto/openssl.py @@ -322,9 +322,9 @@ def run_method(method): def run_aead_method(method, key_len=16): print(method, ': [payload][tag]', key_len) - cipher = libcrypto.EVP_get_cipherbyname(method) + cipher = libcrypto.EVP_get_cipherbyname(common.to_bytes(method)) if not cipher: - cipher = load_cipher(method) + cipher = load_cipher(common.to_bytes(method)) if not cipher: print('cipher not avaiable, please upgrade openssl') return @@ -338,9 +338,9 @@ def run_aead_method(method, key_len=16): def run_aead_method_chunk(method, key_len=16): print(method, ': chunk([size][tag][payload][tag]', key_len) - cipher = libcrypto.EVP_get_cipherbyname(method) + cipher = libcrypto.EVP_get_cipherbyname(common.to_bytes(method)) if not cipher: - cipher = load_cipher(method) + cipher = load_cipher(common.to_bytes(method)) if not cipher: print('cipher not avaiable, please upgrade openssl') return