ubuntu18.04下ssh-qt5无法FQ更新openssl之后【学习笔记】
说明:突然ssh-qt5无法使用,但是window可以正常FQ,ubuntu18.04最近却无法FQ。为什么能,应该是最近安装了什么软件导致,接口不兼容导致的,在FQ的时候却报了如下一堆的问题。


chroem浏览器报的错误:
1 ERROR:ssl_client_socket_impl.cc(1050)] handshake failed; returned -1, SSL error code 1, net_error -100
sslocal命令报的错误:
1 2018-09-29 17:08:06 INFO loading libcrypto from libcrypto.so.1.1 2 Traceback (most recent call last): 3 File "/usr/local/bin/sslocal", line 11, in <module> 4 load_entry_point('shadowsocks==2.8.2', 'console_scripts', 'sslocal')() 5 File "/usr/local/lib/python3.6/dist-packages/shadowsocks/local.py", line 39, in main 6 config = shell.get_config(True) 7 File "/usr/local/lib/python3.6/dist-packages/shadowsocks/shell.py", line 262, in get_config 8 check_config(config, is_local) 9 File "/usr/local/lib/python3.6/dist-packages/shadowsocks/shell.py", line 124, in check_config 10 encrypt.try_cipher(config['password'], config['method']) 11 File "/usr/local/lib/python3.6/dist-packages/shadowsocks/encrypt.py", line 44, in try_cipher 12 Encryptor(key, method) 13 File "/usr/local/lib/python3.6/dist-packages/shadowsocks/encrypt.py", line 83, in __init__ 14 random_string(self._method_info[1])) 15 File "/usr/local/lib/python3.6/dist-packages/shadowsocks/encrypt.py", line 109, in get_cipher 16 return m[2](method, key, iv, op) 17 File "/usr/local/lib/python3.6/dist-packages/shadowsocks/crypto/rc4_md5.py", line 33, in create_cipher 18 return openssl.OpenSSLCrypto(b'rc4', rc4_key, b'', op) 19 File "/usr/local/lib/python3.6/dist-packages/shadowsocks/crypto/openssl.py", line 76, in __init__ 20 load_openssl() 21 File "/usr/local/lib/python3.6/dist-packages/shadowsocks/crypto/openssl.py", line 52, in load_openssl 22 libcrypto.EVP_CIPHER_CTX_cleanup.argtypes = (c_void_p,) 23 File "/usr/lib/python3.6/ctypes/__init__.py", line 361, in __getattr__ 24 func = self.__getitem__(name) 25 File "/usr/lib/python3.6/ctypes/__init__.py", line 366, in __getitem__ 26 func = self._FuncPtr((name_or_ordinal, self)) 27 AttributeError: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: undefined symbol: EVP_
解决办法,由于最近更新了openssl,但是新版本的openssl没有使用EVP_CIPHER_CTX_cleanup接口,改用EVP_CIPHER_CTX_reset导致的:
1 sudo vim /usr/local/lib/python3.6/dist-packages/shadowsocks/crypto/openssl.py
修改如下:


重新打开ssh-qt5即可FQ成功:


浙公网安备 33010602011771号