From 24a5808201ea6440095dc9d9b334b9c678c91437 Mon Sep 17 00:00:00 2001 From: Zou Yong Date: Mon, 6 Mar 2017 13:25:20 +0800 Subject: [PATCH] Fix python3 test code --- shadowsocks/crypto/openssl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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