Merge pull request #298 from dalf/ssl

[fix] SSL : SNI support
This commit is contained in:
Adam Tauber 2015-04-26 13:12:04 -04:00
commit 18e7d60702
8 changed files with 25 additions and 12 deletions

View file

@ -65,6 +65,16 @@ from searx.query import Query
from searx.autocomplete import searx_bang, backends as autocomplete_backends
from searx.plugins import plugins
# check if the pyopenssl, ndg-httpsclient, pyasn1 packages are installed.
# They are needed for SSL connection without trouble, see #298
try:
import OpenSSL.SSL # NOQA
import ndg.httpsclient # NOQA
import pyasn1 # NOQA
except ImportError:
logger.critical("The pyopenssl, ndg-httpsclient, pyasn1 packages have to be installed.\n"
"Some HTTPS connections will failed")
static_path, templates_path, themes =\
get_themes(settings['themes_path']