Skip to content

Instantly share code, notes, and snippets.

@dstrctrng
Created October 17, 2013 21:43
Show Gist options
  • Save dstrctrng/7032734 to your computer and use it in GitHub Desktop.
Save dstrctrng/7032734 to your computer and use it in GitHub Desktop.
curl http://curl.haxx.se/ca/cacert.pem | while read -r a; do
[[ "$a" = "-----BEGIN CERTIFICATE-----" ]] && { echo "$a" > cert; continue; }
[[ "$a" = "-----END CERTIFICATE-----" ]] && { echo "$a" >> cert; mv cert $(openssl x509 -hash -noout -in cert).0; }
[[ -f cert ]] && echo "$a" >> cert
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment