One of my clients runs their own Composer repository for some packages which is hosted on internal system where the SSL is signed by an internal root CA cert. I installed the relevant certificates into my Keychain, but Composer complained about not being able to trust the certificate.
I use the Homebrew version of PHP which links to Homebrew’s OpenSSL, so I realised that OpenSSL wasn’t looking at the keychain, but instead at its own store,
cert.pem
which can be found in the OpenSSL directory. OpenSSL will tell you where that directory is if you use
openssl version -d
:
However
, this does not take into account your trust settings and so includes any certificates you have not trusted.
So the next step is to
check each one with
system verify-cert
and then add to
cert.pem
. This requires splitting up the output of
system find-certificate
which is a hassle!
Fortunately someone else has done the work for us!
I'm
Rob Allen
, a software consultant and engineering leader, concentrating on HTTP APIs. A proponent of Open Source, I maintain
rst2pdf
and
Slim Framework
, and contribute to
Apache OpenWhisk
amongst other OSS projects.
I live in the UK, run
19FT
and publish
Daily Jotter
for Mac. I am a public speaker and wrote
Zend Framework in Action
.