0

I am trying to send a queued notification using the Laravel Queue but getting this error when I run this in my test site. I am using cert generated by LetsEncrypt for https.

production.ERROR: cURL error 60: Peer's Certificate issuer is not recognized. (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) {"exception":"[object] (GuzzleHttp\\Exception\\RequestException(code: 0): cURL error 60: Peer's Certificate issuer is not recognized. (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) at /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:201)
[stacktrace]
#0 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(155): GuzzleHttp\\Handler\\CurlFactory::createRejection(Object(GuzzleHttp\\Handler\\EasyHandle), Array)

I see this further down the error chain also:

#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php(74): Illuminate\\Notifications\\ChannelManager->sendNow(Object(App\\User), Object(App\\Notifications\\CustomMailNotification), Array)

Any idea what I am doing wrong or incorrectly. I am hosted on DigitalOcean

user1647708
  • 447
  • 3
  • 9
  • 22

1 Answers1

1

I have se same problem with my local environment (Laravel 7 / Http Client):

And the solutions was add options to de GuzzleHttp client in the 'withOptions' method to disable verification

 $options = ['verify'=>false];

The code with condition if a local environment:

    public function authApi(){

        $options = [];

        if (App::environment('local')) {
            $options = ['verify'=>false];
        }
        return Http::withBasicAuth($this->client_key, $this->client_key_secret)->withOptions($options);

    }