Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Script to set the pwd to use curl with an bbc cert (exported in OSX from KeyChain access)
echo "Note: run this using . ./ to set the variable in the host bash (it is expected that the bbc-cert.p12 is in the current path"
echo "What is the .p12 password: "
read -s pwd
export P12_PWD=$pwd
echo "The password has been set to the P12_PWD variable"
echo "Testing using:"
echo "curl -s --cert bbc-cert.p12:\$P12_PWD \"\" | python -mjson.tool "
curl -s --cert bbc-cert.p12:$P12_PWD "" | python -mjson.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment