|
@@ -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:
|