Last active
June 12, 2016 20:59
-
-
Save JanTvrdik/9ad909f81d37697e580d3c06d9365852 to your computer and use it in GitHub Desktop.
PHP CA bundle updater
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit -o pipefail -o nounset | |
IFS=$'\n\t' | |
ROOT_CRT="$(dirname $0)/root/root.crt" | |
CA_BUNDLE="$(dirname $0)/ca-bundle.pem" | |
echo -n "Downloading CA bundle... " | |
wget -q -O "$CA_BUNDLE" https://curl.haxx.se/ca/cacert.pem | |
echo "done" | |
echo -n "Appending my own root CA... " | |
echo "" >> "$CA_BUNDLE" | |
echo "JanTvrdik's Root CA" >> "$CA_BUNDLE" | |
echo "===================" >> "$CA_BUNDLE" | |
cat "$ROOT_CRT" >> "$CA_BUNDLE" | |
echo "done" | |
echo "" | |
echo "Printing CA bundle header for visual confirmation" | |
echo "" | |
head "$CA_BUNDLE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment