diff options
| author | Alexandre Flament <alex@al-f.net> | 2022-10-14 16:06:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-14 16:06:29 +0200 |
| commit | 2eb817011cb405c427ed2dfbd57f5a6f0269c429 (patch) | |
| tree | 2b70a212b2ccc5e26e77690f8a766f6e573c3c77 /searx/webapp.py | |
| parent | 72f6367e2323b2c57b2bb479dbadccd5b690a986 (diff) | |
| parent | 32e8c2cf098ae59baae5672e70436e47299bec82 (diff) | |
Merge pull request #1529 from dalf/network_trust_env
searx.network: use SSL_CERT_FILE and SSL_CERT_DIR when they are defined
Diffstat (limited to 'searx/webapp.py')
| -rwxr-xr-x | searx/webapp.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 688698bb6..5c3fbae8b 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -165,6 +165,7 @@ timeout_text = gettext('timeout') parsing_error_text = gettext('parsing error') http_protocol_error_text = gettext('HTTP protocol error') network_error_text = gettext('network error') +ssl_cert_error_text = gettext("SSL error: certificate validation has failed") exception_classname_to_text = { None: gettext('unexpected crash'), 'timeout': timeout_text, @@ -189,6 +190,8 @@ exception_classname_to_text = { 'KeyError': parsing_error_text, 'json.decoder.JSONDecodeError': parsing_error_text, 'lxml.etree.ParserError': parsing_error_text, + 'ssl.SSLCertVerificationError': ssl_cert_error_text, # for Python > 3.7 + 'ssl.CertificateError': ssl_cert_error_text, # for Python 3.7 } |