0

I'm running Laravel 4.2 using Mailgun. Everything was working normally, then suddenly, with no changes made, I started getting

GuzzleHttp\Exception\AdapterException: cURL error 60: SSL certificate problem: 
unable to get local issuer certificate

This is happening only for mail. Other curl request work just fine.

I can't make heads or tails of it. I have a valid SSL cert - the same one that's been working the whole time. I have Guzzlehttp/guzzle 4.0

What could have caused this? And where do I even begin looking to fix it?

Trattles
  • 647
  • 1
  • 6
  • 21

1 Answers1

1

On the 18th of January 2018 mailgun updated their SSL certificates.

This can be seen by running the following curl command in terminal:

curl -vvv https://api.mailgun.net/

* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
*        server certificate verification OK
*        server certificate status verification SKIPPED
*        common name: *.mailgun.net (matched)
*        server certificate expiration date OK
*        server certificate activation date OK
*        certificate public key: RSA
*        certificate version: #3
*        subject: C=US,ST=California,L=San Francisco,O=MAILGUN TECHNOLOGIES,
                  INC,OU=MAILGUN TECHNOLOGIES\, INC,CN=*.mailgun.net
*        start date: Thu, 18 Jan 2018 00:00:00 GMT
*        expire date: Wed, 18 Mar 2020 12:00:00 GMT
*        issuer: C=US,O=DigiCert Inc,OU=www.digicert.com
                 CN=Thawte TLS RSA CA G1
*        compression: NULL

As you can see the certificate have been valid from Thu, 18 Jan 2018 around the same time your issue started.

What does this mean for you. It probably means you machines certificates files are out of date. Updating these files will allow you to valid the new mailgun ssl certificate.

Matt Seymour
  • 8,880
  • 7
  • 60
  • 101
  • Any hints on how to actually start solving this? Thanks. – Mihai Mar 26 '18 at 18:38
  • Update your system certificates (this will be OS dependent). You can download the mailgun cert and add it to your system. It might also be that some PHP packages on your system come with installed certificate files. In this case you will need to update some of the packages in your app. – Matt Seymour Mar 27 '18 at 10:53