Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document and throw an error to help people with CURLOPT_SSL_VERIFYPEER issues #90

Closed
akaSyntaax opened this issue Mar 10, 2018 · 5 comments · Fixed by #103
Closed

Document and throw an error to help people with CURLOPT_SSL_VERIFYPEER issues #90

akaSyntaax opened this issue Mar 10, 2018 · 5 comments · Fixed by #103
Labels
difficulty: medium fix is medium in difficulty type: community enhancement feature request not on Twilio's roadmap

Comments

@akaSyntaax
Copy link

Issue Summary

If I try to send an email trough the sendgrid-php api I only get a timeout after a while, the email doesn't get send. There are no errors thrown. This issue happened after an update from version 3.9.0 to 3.9.1.

Steps to Reproduce

  1. Try to send a simple email (from the sendgrid-php repository for example)

Technical details:

  • php-http-client Version: 3.9.1 (commit 56d046a)
  • PHP Version: 7.1.15-1
@thinkingserious thinkingserious added status: help wanted requesting help from the community type: question question directed at the library difficulty: unknown or n/a fix is unknown in difficulty labels Mar 10, 2018
@thinkingserious
Copy link
Contributor

Hello @akaSyntaax,

I believe the issue is probably due to this: https://github.com/sendgrid/php-http-client/blob/master/lib/Client.php#L189

If you set that value to false it will work, but that would be insecure, per this issue: #81. The better fix would be to update your *.pem path, like so: https://stackoverflow.com/questions/18971983/curl-requires-curlopt-ssl-verifypeer-false

With Best Regards,

Elmer

@thinkingserious
Copy link
Contributor

That said, we need to update the SDK to throw an error that specifically states the peer is not verified.

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap difficulty: easy fix is easy in difficulty up-for-grabs and removed difficulty: unknown or n/a fix is unknown in difficulty labels Mar 10, 2018
@akaSyntaax
Copy link
Author

Hello @thinkingserious,

I updated my *.pem path as you said and this resolved my issue.
Thank you very much!

Kind regards,
Hendrik Lübke (akaSyntaax)

@thinkingserious
Copy link
Contributor

Thanks for the follow up @akaSyntaax.

I'm re-opening so we can properly document this and create a helpful error message.

@thinkingserious thinkingserious changed the title 504 Gateway Time-out when trying to send an email Document and throw an error to help people with CURLOPT_SSL_VERIFYPEER issues Mar 12, 2018
@thinkingserious thinkingserious added difficulty: medium fix is medium in difficulty hacktoberfest and removed difficulty: easy fix is easy in difficulty labels Sep 28, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 2, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 2, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 2, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 2, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 2, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 2, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 2, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 2, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 2, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 2, 2018
@colinodell
Copy link
Contributor

I have introduced three possible PRs to address this:

Two PRs to alert the user to an issue:

One PR (#105) to help users whose PHP instance is having trouble locating the CA bundle.

@thinkingserious thinkingserious added status: work in progress Twilio or the community is in the process of implementing and removed help wanted status: help wanted requesting help from the community type: question question directed at the library labels Oct 3, 2018
colinodell added a commit to colinodell/php-http-client that referenced this issue Oct 4, 2018
@childish-sambino childish-sambino removed the status: work in progress Twilio or the community is in the process of implementing label Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
4 participants