douchuanchai2793 2018-09-20 17:23
浏览 153

如何使用Laravel Socialite正确修复CURL Error 60?

I've spend a good part of the last couple of days reading through all the solutions on stackoverflow and google but to no avail.

So the concrete problem:
I purchased an SSL certificate from namecheap for my webpage. This particular site is hosted on Amazon EC2, on an Amazon AMI (1).

The site is reachable through HTTPS, and even http://ssllabs.com confirms that both the ssl and the ca bundle are in good shape. However laravel socialite throws a curl 60 error peer cert not valid.

I've double and triple checked that everything is ok on the php.ini on the curl path, so no clue.

The weirdest part is that if i use the cert from https://curl.haxx.se/docs/caextract.html it works just fine!

So excuse the novice question, but am I SUPPOSED to use this cert for CURL? And another different set for https?

Thanks!

Update:

I've updated my php.ini with the cacert.pem path downloaded from https://curl.haxx.se/docs/caextract.html

[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo="/var/www/html/cacert.php"

And now im getting a 77 error:

"cURL error 77:  (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)"
  • 写回答

1条回答 默认 最新

  • douyan4958 2018-09-20 22:02
    关注

    Finally figured it out!

    When I was setting up the SSL certificates for the webserver I wrote over the ca-bundle.crt on the route /etc/pki/tls/certs

    Even though I was updating the configuration for the SSL at the php.ini and the ssl.conf files, CURL didnt want to play along. Reverting the changes and using the original server certificate fixed CURL, and i just renamed the https certificate.

    Hope this helps someone with a similar problem.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分