Because when from lib.sslcrypto.openssl import discovery imported for patching it also imports sslcrypto/openssl/library.py that is executes discover_library() before the patch.
Traceback (most recent call last):
File "zeronet.py", line 17, in main
main.start()
File ".\ZeroNet-py3\src\main.py", line 602, in start
actions.call(config.action, action_kwargs)
File ".\ZeroNet-py3\src\main.py", line 133, in call
back = func(**kwargs)
File ".\ZeroNet-py3\src\main.py", line 585, in test
for progress in ret:
File ".\ZeroNet-py3\plugins\Stats\StatsPlugin.py", line 577, in testEnv
from Crypt import CryptBitcoin
File ".\ZeroNet-py3\src\Crypt\CryptBitcoin.py", line 10, in <module>
import util.OpensslFindPatch
File ".\ZeroNet-py3\src\util\OpensslFindPatch.py", line 5, in <module>
from lib.sslcrypto.openssl import discovery
File ".\ZeroNet-py3\src\lib\sslcrypto\openssl\__init__.py", line 1, in <module>
from .aes import aes
File ".\ZeroNet-py3\src\lib\sslcrypto\openssl\aes.py", line 5, in <module>
from .library import lib, openssl_backend
File ".\ZeroNet-py3\src\lib\sslcrypto\openssl\library.py", line 83, in <module>
lib = discover_library()
File ".\ZeroNet-py3\src\lib\sslcrypto\openssl\library.py", line 80, in discover_library
raise OSError("OpenSSL is unavailable")
OSError: OpenSSL is unavailable
Because when
from lib.sslcrypto.openssl import discovery
imported for patching it also importssslcrypto/openssl/library.py
that is executesdiscover_library()
before the patch.