Created
December 14, 2016 11:16
-
-
Save DinisCruz/c297344a097f4febc1fce688d7171318 to your computer and use it in GitHub Desktop.
Script to set the pwd to use curl with an bbc cert (exported in OSX from KeyChain access)
This file contains 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
#!/bin/bash | |
echo | |
echo "Note: run this using . ./set-cert-pwd.sh 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 | |
echo "Testing using:" | |
echo | |
echo "curl -s --cert bbc-cert.p12:\$P12_PWD \"https://confluence.dev.bbc.co.uk/rest/api/content/?limit=0&start=0\" | python -mjson.tool " | |
echo | |
curl -s --cert bbc-cert.p12:$P12_PWD "https://confluence.dev.bbc.co.uk/rest/api/content/?limit=0&start=0" | python -mjson.tool |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment