I have a strange problem. Before 2 days my script work ok, but today my site stop working and show me this message "SSL operation failed with code 1. OpenSSL Error messages: error:140940E5:SSL routines:ssl3_read_bytes:ssl handshake failure". There are no changes made these days. Thanks in advance.
The host has probably recently disabled SSL3. If you're specifying the CURLOPT_SSLVERSION, comment it out.
Related
I am trying to execute the API tool available here:
https://github.com/Brightspace/util-api-test-tool
However, I am getting this error and I not able to solve it:
Error contacting server: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure.
I already updated curl, where I have:
curl 7.62.0 (x86_64-pc-win32) libcurl/7.62.0 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.7 WinIDN libssh2/1.8.0 nghttp2/1.34.0
My configurations are XAMPP 1.7.2 and PHP 5.3. I'm using Windows and netbeans.
I have research for this error and it seems to be very common, but I cannot find the solution for PHP. Any help is a good help.
sslv3 (which your *ancient* xampp+apache server use) was disabled-by-default in curl version 7.39.0, which means you must add the --sslv3 argument to connect to sslv3-servers since 7.39.0. and as stated in your post, you're using 7.62.0, so add
the --sslv3 argument.
... also, you should consider upgrading your apache installation.
I am running PHP 7.1 on Windows and seeing a weird behavior. When using cURL to make API calls, everything seems to work for a little bit. After some random interval, the calls start failing with this error.
cURL error 77: error setting certificate verify locations: CAfile: c:\<path intentionally removed>\cacert.pem CApath: none (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
Restarting Apache seems to fix the issue. Then after some random time, it starts showing up again for no obvious reason. Does anyone know what might be going on here?
After more troubleshooting, I was able to boil down the issue to the xdebug module. I disabled xdebug and now the SSL connections are working consistently.
I have a number of sites running on caddy. I call between them on the same machine from php apps
file_get_contents('https://myapi.example.com/my/api/call');
up until today it was all working lovely then I started getting
SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
All my certs are from LetsEncrypt.org which have been fetched by Caddy, and since they were working up until very recently I am wondering what has changed.
I have tried setting
verify_peer = false
in various contexts with no success and also I know this kindof breaks SSL which is not a good long term solution.
Any Ideas?
Fundamentally I don't know what caused this error, but revoking my cert and getting a new one solved the problem.
Simply call Caddy with
caddy -revoke myapi.example.com
then restart caddy and the problem was solved.
I am getting
Failed to fetch file due to error "cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
error message when I try to install a module in Drupal 8.1.8
I found https://www.drupal.org/node/2654474#comment-11232057 which seems to say it is a problem with my stack, UwAMP. I did not follow the procedure in that post because it indicated it did not fix the problem.
Can someone tell me how to fix this?
Found the solution at https://www.drupal.org/node/2654474#comment-11553625
In my case I had to add a "certs" folder to C:\UwAmp\bin\apache\conf\ then download the cacert.pem to that certs folder. I also had to add "curl.cainfo = C:\UwAmp\bin\apache\conf\certs\cacert.pem" to my php.ini file using the UwAmp GUI.
For the benefit of those of us who are newbies please explain what's happening here and why the solution fixed the problem. Please also explain why there is not some kind of fix to Drupal 8 to prevent this problem from happening.
Thanks!
I'm having problems with the facebook example code.
Fatal error: Uncaught CurlException: 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed thrown in C:\inetpub\wwwroot\src\facebook.php on line 616
I found a solution that I don't know what to do with here. I'm running IIS7 and trying to test this on localhost. The solution specified that I should add
$opts[CURLOPT_CAINFO] = [PATH]/apache/conf/ssl.crt/ca-bundle.crt"; //Or your path to "ca-bundle.crt"
to the code. I found the array where this info should go but I have absolutely no idea where the certificates are stored. I searched my machine for my self-signed cert ("myown") but couldn't find it. I googled for the location of cert files on IIS7 but realized I'd be better of here since maybe I don't even need to specify SSL certs.
Any suggestions? What I want to do is just to be able to run the code, I don't have any requirements of SSL right now.
i think that the certificate is being returned but can not be validated, within C# you can usually do something like so:
ServicePointManager.ServerCertificateValidationCallback = delegate{
return true;
};
so this is a callback that's executed before the certificate is validate and acts as a user validation method.
WARNING: this will validate all certificates regardless
never used IIS but im sure it would be something along these lines.