torchlight-api / torchlight-laravel

A Laravel client for Torchlight - the syntax highlighting API.
https://torchlight.dev
MIT License
113 stars 16 forks source link

cURL error 60: SSL certificate problem: certificate has expired #33

Closed Jakub003 closed 2 years ago

Jakub003 commented 2 years ago

I followed all the instructions on here https://torchlight.dev/docs/clients/laravel and this is for a laravel 9.x installaton

Any ideas on how I could resolve this issue https://flareapp.io/share/x7Xo6DxP#F34

I tried updating guzzlehttp but that did not resolve the issue

Any tips would be much apprciated

aarondfrancis commented 2 years ago

Hmm that's interesting. I just checked it and it seems like it's valid from February 7 to May 9.

https://www.sslshopper.com/ssl-checker.html#hostname=api.torchlight.dev https://www.ssllabs.com/ssltest/analyze.html?d=api.torchlight.dev&s=76.76.21.61&hideResults=on

What OS are you checking from?

Jakub003 commented 2 years ago

I am using windows 10, and installed laravel recently so nothing should be out of date

Jakub003 commented 2 years ago

I will reinstall a new laravel and try get it working on it

aarondfrancis commented 2 years ago

I can't imagine it's a Laravel thing. Are you at a coffee shop or hotel by chance? Something that pops up an interstitial to access the internet?

Jakub003 commented 2 years ago

Yea, i dont think its laravel. I just did a new install

<x-guest-layout>
    <x-torchlight-code language='php'>
        echo "Hello World!";
    </x-torchlight-code>
</x-guest-layout>

And it doesn't work

I am at home and using my own wifi. I tested the website loading with a VPN on and off and doesn't seem to make a difference. But will try deploying it on forge, and see if it will work on digital ocean servers. Maybe it is my internet

aarondfrancis commented 2 years ago

There was a Lets Encrypt deal a while back that borked some cert chains, so it could be that. https://community.letsencrypt.org/t/curl-60-ssl-certificate-problem-certificate-has-expired/161453/3

Jakub003 commented 2 years ago

It seems to work on the live site https://bytesize.tips/features/markdown

The code component looks like this

 <x-torchlight-code language='php' theme="material-theme-palenight">
            echo "Hello World!";
            test
 </x-torchlight-code>

So must be something wrong with my connection =/

Jakub003 commented 2 years ago

Issue is resolved, I had to download this file https://curl.haxx.se/ca/cacert.pem and put it in the php/extra/ssl folder

Then in the php.ini file to find the curl.cainfo and update the path

Now it all works :D