Browse Source

Minor fix: never use except: unless you reraise

master
fa08c 10 years ago
parent
commit
18da3554ff
  1. 2
      shadowsocks/crypto/rc4_md5.py

2
shadowsocks/crypto/rc4_md5.py

@ -39,7 +39,7 @@ def create_cipher(alg, key, iv, op, key_as_bytes=0, d=None, salt=None,
try: try:
from shadowsocks.crypto import ctypes_openssl from shadowsocks.crypto import ctypes_openssl
return ctypes_openssl.CtypesCrypto(b'rc4', rc4_key, b'', op) return ctypes_openssl.CtypesCrypto(b'rc4', rc4_key, b'', op)
except: except Exception:
import M2Crypto.EVP import M2Crypto.EVP
return M2Crypto.EVP.Cipher(b'rc4', rc4_key, b'', op, return M2Crypto.EVP.Cipher(b'rc4', rc4_key, b'', op,
key_as_bytes=0, d='md5', salt=None, i=1, key_as_bytes=0, d='md5', salt=None, i=1,

Loading…
Cancel
Save