From 7d9b01afd907b58b0a8d8b0fefb8df70b273d23f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Mar 2021 23:23:29 +0100 Subject: [PATCH] Disable SSL certificate validation for pip in Trusty CI build Trusty Python is too old to support SNI, so the new certificate used by files.pythonhosted.org doesn't validate. Just disable checking it there. --- build/tools/travis-ci.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index c5b786bce4..bc5a52abee 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -16,7 +16,15 @@ launch_httpbin() { echo 'travis_fold:start:httpbin' echo 'Running httpbin...' - pip install httpbin --user + # We need to disable SSL certificate checking under Trusty because Python + # version there is too old to support SNI. + case "$(lsb_release --codename --short)" in + trusty) + pip_args='--trusted-host files.pythonhosted.org' + ;; + esac + + pip install httpbin --user $pip_args python -m httpbin.core & WX_TEST_WEBREQUEST_URL="http://localhost:5000"