diff options
author | Alexandre Flament <alex@al-f.net> | 2020-09-15 10:54:31 +0200 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2020-09-26 19:30:27 +0200 |
commit | 93f7f7eee2e843b3b3057b7854508c68c6432f3e (patch) | |
tree | f1b46097be9ca1a2061c6962f7e7a6fa5e5b2399 /searx/__init__.py | |
parent | 21dbc7e852a5c48097c0067e78f0600972e54823 (diff) | |
download | searxng-93f7f7eee2e843b3b3057b7854508c68c6432f3e.tar.gz searxng-93f7f7eee2e843b3b3057b7854508c68c6432f3e.zip |
[mod] upgrade requests to version 2.24.0. use ssl instead of pyopenssl.
requests 2.24.0 uses the ssl module except if it doesn't support SNI, in this case searx fallbacks to pyopenssl.
searx logs a critical message and exit if the ssl modules doesn't support SNI and pyOpenSSL is not installed.
searx logs a critical message and exit if the ssl version is older than 1.0.2.
in requirements.txt, pyopenssl is still required to install searx as a fallback.
Diffstat (limited to 'searx/__init__.py')
-rw-r--r-- | searx/__init__.py | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/searx/__init__.py b/searx/__init__.py index 80a7ffc76..b90cf5358 100644 --- a/searx/__init__.py +++ b/searx/__init__.py @@ -15,12 +15,10 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >. (C) 2013- by Adam Tauber, <asciimoo@gmail.com> ''' -import certifi import logging from os import environ from os.path import realpath, dirname, join, abspath, isfile from io import open -from ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION from yaml import safe_load @@ -81,13 +79,6 @@ else: logger = logging.getLogger('searx') logger.debug('read configuration from %s', settings_path) -# Workaround for openssl versions <1.0.2 -# https://github.com/certifi/python-certifi/issues/26 -if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2): - if hasattr(certifi, 'old_where'): - environ['REQUESTS_CA_BUNDLE'] = certifi.old_where() - logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION)) - logger.info('Initialisation done') if 'SEARX_SECRET' in environ: |