Treat url strings are unsplittable

Fixes #22498
This commit is contained in:
Shanavas M 2019-01-08 17:36:46 +05:30
parent 11d1184663
commit 650a92ac9c
3 changed files with 10 additions and 4 deletions

View file

@ -18,9 +18,7 @@ set -o pipefail
# (some are Email-only), column 30 is printed, the raw certificate.
# 6. All CA certs trusted for Websites are stored into the `certs` file.
domain="ccadb-public.secure.force.com";
curl "https://${domain}/mozilla/IncludedCACertificateReportPEMCSV" -sSf | \
gawk -v RS="\"\n" -F'","|^"' \
url="https://ccadb-public.secure.force.com/mozilla/IncludedCACertificateReportPEMCSV"
curl "${url}" -sSf | gawk -v RS="\"\n" -F'","|^"' \
'{gsub("\047","",$(30));gsub("\"","",$(30));if($(13)~/Websites/)print $(30)}' \
> certs