summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-04-26 13:12:04 -0400
committerAdam Tauber <asciimoo@gmail.com>2015-04-26 13:12:04 -0400
commit18e7d6070275fbc48aef3d84a7f69811541e1fe5 (patch)
tree0b8b649f5c504c945d787650ea947ad282ac39e4 /searx/webapp.py
parentff68546c69b68c4f83eb843f3ecb5789358d2f32 (diff)
parent187617498a0dea17e51950f1ad5e96bb4826367d (diff)
downloadsearxng-18e7d6070275fbc48aef3d84a7f69811541e1fe5.tar.gz
searxng-18e7d6070275fbc48aef3d84a7f69811541e1fe5.zip
Merge pull request #298 from dalf/ssl
[fix] SSL : SNI support
Diffstat (limited to 'searx/webapp.py')
-rw-r--r--searx/webapp.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 41f579551..3ef5a72c8 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -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']