Curl Code:
$curl = Curl_init ();
curl_setopt ($curl, Curlopt_url, $url);
curl_setopt ($curl, Curlopt_port, 443);
curl_setopt ($curl, Curlopt_sslversion, 3);
curl_setopt ($curl, Curlopt_ssl_verifypeer, false); Trust any Certificate
curl_setopt ($curl, curlopt_ssl_verifyhost, 0); Check whether the domain name is set in the certificate, 0 does not validate
curl_setopt ($curl, Curlopt_verbose, 1); Debug mode
curl_setopt ($curl, Curlopt_sslcert, "./keys/client.crt"); CLIENT.CRT file path
curl_setopt ($curl, curlopt_sslcertpasswd, "112358"); Client certificate Password
curl_setopt ($curl, Curlopt_sslkey, "./keys/client.key");
curl_setopt ($curl, Curlopt_post, 1);
curl_setopt ($curl, Curlopt_postfields, $data);
Always return int 58 This curl error
int 58
Unable to use client certificate (no key found or wrong pass phrase?)
Regenerate the certificate once, or not
Local environment WAMP generated certificates can be accessed directly on IE browser
Have you ever met a classmate?
Reply to discussion (solution)
Solved yourself, before the certificate generated the wrong, now is the wrong path to write ...
This code is preserved first. Refer later.
Want to ask, CLIENT.CRT and client.key How to get, the other side only gave me P12 file and a CRT file