这个问题是由于在openssl1.1.0版本中,废弃了EVP_CIPHER_CTX_cleanup函数,如官网中所说:

EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0. As a result, EVP_CIPHER_CTX_reset() appeared and EVP_CIPHER_CTX_cleanup() disappeared. EVP_CIPHER_CTX_init() remains as an alias for EVP_CIPHER_CTX_reset().

EVP_CIPHER_CTX_reset函数替代了EVP_CIPHER_CTX_cleanup函数

EVP_CIPHER_CTX_reset函数说明:

EVP_CIPHER_CTX_reset() clears all information from a cipher context and free up any allocated memory associate with it, except the ctx itself. This function should be called anytime ctx is to be reused for another EVP_CipherInit() / EVP_CipherUpdate() / EVP_CipherFinal() series of calls.

EVP_CIPHER_CTX_cleanup函数说明:

EVP_CIPHER_CTX_cleanup() clears all information from a cipher context and free up any allocated memory associate with it. It should be called after all operations using a cipher are complete so sensitive information does not remain in memory.

可以看出,二者功能基本上相同,都是释放内存,只是应该调用的时机稍有不同,所以用reset代替cleanup问题不大。

修改方法:

用vi打开文件:
vi /usr/lib/python2.7/site-packages/shadowsocks/crypto/openssl.py
跳转到52行(shadowsocks2.8.2版本,其他版本搜索一下cleanup)
进入编辑模式
将第52行

libcrypto.EVP_CIPHER_CTX_cleanup.argtypes = (c_void_p,)

改为
libcrypto.EVP_CIPHER_CTX_reset.argtypes = (c_void_p,)
再次搜索cleanup(全文件共2处,此处位于111行),将
libcrypto.EVP_CIPHER_CTX_cleanup(self._ctx)
改为
libcrypto.EVP_CIPHER_CTX_reset(self._ctx)
保存并退出
启动sslocal服务