right - I'm really stuck here.
I am using php/curl to talk to a remote system. I have been issued with a client certificate, which basically consists of a private key concatenated with a certificate. I slurp all this into $clientcert and specify it using
curl_setupt($ch, CURLOPT_SSLCERT, $clientcert);
I have also exported this certificate with the private key, converted it into a .pem file and pasted the private key section into a file called clientkey.key. I'm pointing curl at this using:
curl_setopt($ch, CURLOPT_SSLKEY, $clientkey);
where $clientkey contains the path to the clientkey.key file.
I also have the SSLCERTPASSWD specified, and it's definitely right
However I still get this error: 58 - unable to use client certificate (no key found or wrong pass phrase?).
I have this working just perfectly from the command line, so I really just want to translate this command into the php/curl equivalent:
Quote:
curl -E /export/newtos/frontend/etc/client-cert.pem:blabla --cacert /export/newtos/frontend/etc/northside.pem --data-binary @/root/temp/file-converted.txt -H "Content-Type: multipart/related; type="text/xml"; boundary="--someBoundaryValue--"; start="ebXML_Message_Header"" https://www.blabla.com/north
|
What am I doing wrong here? It could be that I'm missing out the '--cacert' option, which points to the northside.pem, which I think is a root certificate. I get horribly confused with all this stuff.. how do I specify this bundle using curl_setopt()?
Any thoughts would be great,
christo