Bug 1532902 - Check https certificates during update verify, r=sfraser

Differential Revision: https://phabricator.services.mozilla.com/D22267

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nick Thomas 2019-03-06 08:53:41 +00:00
Родитель 304127c7d6
Коммит c2ce6f9fa6
5 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -29,7 +29,7 @@ cached_download () {
else
echo "Downloading '${url}' and placing in cache..."
rm -f "${output_file}"
$retry wget -O "${output_file}" --progress=dot:mega --server-response --no-check-certificate "${url}" 2>&1
$retry wget -O "${output_file}" --progress=dot:mega --server-response "${url}" 2>&1
local exit_code=$?
if [ "${exit_code}" == 0 ]; then
echo "${url}" >> "${cache_dir}/urls.list"

Просмотреть файл

@ -72,7 +72,7 @@ download_mars () {
if [ "$test_only" == "1" ]
then
echo "Testing $URL"
curl -k -s -I -L $URL
curl -s -I -L $URL
return
else
cached_download "update/${patch_type}.mar" "${URL}"

Просмотреть файл

@ -5,7 +5,7 @@ patch_types="${2}"
update_xml="$(mktemp -t update.xml.XXXXXXXXXX)"
update_xml_headers="$(mktemp -t update.xml.headers.XXXXXXXXXX)"
update_xml_debug="$(mktemp -t update.xml.debug.XXXXXXXXXX)"
curl --retry 50 --retry-max-time 300 -k -s -D "${update_xml_headers}" -L -v "${update_xml_url}" > "${update_xml}" 2>"${update_xml_debug}"
curl --retry 50 --retry-max-time 300 -s -D "${update_xml_headers}" -L -v "${update_xml_url}" > "${update_xml}" 2>"${update_xml_debug}"
update_xml_curl_exit_code=$?
if [ "${update_xml_curl_exit_code}" == 0 ]
then

Просмотреть файл

@ -4,7 +4,7 @@ mar_required_size="${2}"
mar_headers_file="$(mktemp -t mar_headers.XXXXXXXXXX)"
mar_headers_debug_file="$(mktemp -t mar_headers_debug.XXXXXXXXXX)"
curl --retry 50 --retry-max-time 300 -k -s -i -r 0-2 -L -v "${mar_url}" > "${mar_headers_file}" 2>"${mar_headers_debug_file}"
curl --retry 50 --retry-max-time 300 -s -i -r 0-2 -L -v "${mar_url}" > "${mar_headers_file}" 2>"${mar_headers_debug_file}"
mar_file_curl_exit_code=$?
# Bug 894368 - HTTP 408's are not handled by the "curl --retry" mechanism; in this case retry in bash
@ -12,7 +12,7 @@ attempts=1
while [ "$((++attempts))" -lt 50 ] && grep 'HTTP/1\.1 408 Request Timeout' "${mar_headers_file}" &>/dev/null
do
sleep 1
curl --retry 50 --retry-max-time 300 -k -s -i -r 0-2 -L -v "${mar_url}" > "${mar_headers_file}" 2>"${mar_headers_debug_file}"
curl --retry 50 --retry-max-time 300 -s -i -r 0-2 -L -v "${mar_url}" > "${mar_headers_file}" 2>"${mar_headers_debug_file}"
mar_file_curl_exit_code=$?
done

Просмотреть файл

@ -158,7 +158,7 @@ do
else
mkdir -p updates/${update_path}/complete
mkdir -p updates/${update_path}/partial
$retry wget --no-check-certificate -q -O ${patch_type} updates/${update_path}/${patch_type}/update.xml "${aus_server}/update/3/${update_path}/update.xml?force=1"
$retry wget -q -O ${patch_type} updates/${update_path}/${patch_type}/update.xml "${aus_server}/update/3/${update_path}/update.xml?force=1"
fi
if [ "$runmode" == "$COMPLETE" ]