Skip to content

Instantly share code, notes, and snippets.

@heiglandreas
Created April 18, 2016 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heiglandreas/58d5f1ceeb76ec1581a22bd5b6101eec to your computer and use it in GitHub Desktop.
Save heiglandreas/58d5f1ceeb76ec1581a22bd5b6101eec to your computer and use it in GitHub Desktop.
Self signed certs without storing the cert in the repo
myrootca.crt
composer prepare
composer update

the first command will download the certificate and the second will then do the update etc. Even better would be a csript that downloads the certificate before any other command would be executed by composer but I couldn't find one (yet)

{
"name": "root/catest",
"authors": [{
"name": "Andreas Heigl",
"email": "andreas@heigl.org"
}],
"repositories": [{
"type": "composer",
"url": "https://example.com/satis",
"options" : {
"ssl" : {
"cafile" : "myrootca.crt"
}
}
}],
"require": {},
"scripts" : {
"prepare" : [
"openssl x509 -in <(openssl s_client -connect example.com:443 -prexit 2>/dev/null) > myrootca.crt"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment