I'm opening a connection like this:
fsockopen('ssl:// ... etc
Which returns with the following error:
Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
I'm probably getting this error because I'm upgrading from PHP 5.3 to PHP 5.6, in PHP 5.6 they actually check your certificate.
I checked my certs location with:
openssl_get_cert_locations()
Which returned the following:
Array
(
[default_cert_file] => f:\repo\winlibs_openssl_vc11_x86/cert.pem
[default_cert_file_env] => SSL_CERT_FILE
[default_cert_dir] => f:\repo\winlibs_openssl_vc11_x86/certs
[default_cert_dir_env] => SSL_CERT_DIR
[default_private_dir] => f:\repo\winlibs_openssl_vc11_x86/private
[default_default_cert_area] => f:\repo\winlibs_openssl_vc11_x86
[ini_cafile] =>
[ini_capath] => C:\OpenSSL-Win32\bin\PEM\cert.pem
)
The bad part is, I do not even have a 'f:\
' location!
I tried to fix this by adding the ini_capath location in my php.ini
like so:
openssl.capath=C:\OpenSSL-Win32\bin\PEM\cert.pem
Which you can see in the array provided by get_cert_location
I'm pretty clueless why its going to the F:
disk (like I said, I do not even have that one), and I also do not know how to change the location.
Any suggestions?