Ok, i have tried most solutions i could find and I can not get this error to go away.
Error: cURL error 60: SSL certificate problem: self-signed certificate
Environment:
Windows 10 PRO
PHP 8.2
Laravel 10
guzzle 7.2
Sail 1.8
docker v4 16.2
ubuntu 22.04
I'm trying to hit a API route that works with postman, but not in the application.
I have downloaded the latest cacert.pem and put it in the docker\8.2 directory
my php.ini
[PHP]
post_max_size = 100M
upload_max_filesize = 100M
variables_order = EGPCS
[curl]
curl.cainfo = "\wsl.localhost\Ubuntu\root\sites\project1\docker.2\cacert.pem"
[opcache]
opcache.enable_cli=1
This really seems like there should be a simple cmd or a set of instructions for docker to run.
The issue is with the self-signed SSL certificate. One solution is to add the certificate to the trusted certificates list. Here are the steps to do that:
Copy the certificate file to the trusted certificates directory. In this case, the certificate file is cacert.pem and the trusted certificates directory is /usr/local/share/ca-certificates/.
If you're using Nginx, replace apache2 with nginx in the above command.
Alternatively, you can disable SSL verification in Guzzle by setting the verify option to false. However, this is not recommended as it can leave your application vulnerable to man-in-the-middle attacks.
$client = new \GuzzleHttp\Client([
'verify' => false
]);
so the set of rest api endpoints require https. i have got the cacerts for the rest api and tried updating my cacerts i have updated windows and ubuntu certs as far as i can tell.