From bf4b77355dcaf6be2b1a5ad725e5efbab8a861a7 Mon Sep 17 00:00:00 2001 From: mengskysama Date: Mon, 19 Feb 2018 00:55:23 +0800 Subject: [PATCH] Update openssl.py --- shadowsocks/crypto/openssl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shadowsocks/crypto/openssl.py b/shadowsocks/crypto/openssl.py index f034bd1..ff63541 100644 --- a/shadowsocks/crypto/openssl.py +++ b/shadowsocks/crypto/openssl.py @@ -346,6 +346,8 @@ def run_method(method): def run_aead_method(method, key_len=16): + if not loaded: + load_openssl(None) print(method, ': [payload][tag]', key_len) cipher = libcrypto.EVP_get_cipherbyname(common.to_bytes(method)) if not cipher: @@ -362,6 +364,8 @@ def run_aead_method(method, key_len=16): def run_aead_method_chunk(method, key_len=16): + if not loaded: + load_openssl(None) print(method, ': chunk([size][tag][payload][tag]', key_len) cipher = libcrypto.EVP_get_cipherbyname(common.to_bytes(method)) if not cipher: