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

SSL Optional #5

Open
ghost opened this issue Jun 21, 2017 · 3 comments
Open

SSL Optional #5

ghost opened this issue Jun 21, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 21, 2017

will be good if you add some optional option like 'CURLOPT_SSL_VERIFYPEER', because when the url using SSL the curl will be error. Add 'curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);' and boom work

@straube
Copy link

straube commented Jan 30, 2018

Hey @Diiedha! This is definitely not the safest path to fix SSL errors. Please refer to this article to learn why -- take a look at the Server-Side HTTPS Requests section.

And, in the end, if you really want to add that option, you can do it manually. Having it by default is not a good idea.

Unless you're suggesting it should support the -k option. Then it makes sense. In that case, you'd be required to add the option to command to have it in the PHP code.

@incarnate
Copy link
Owner

Thanks @straube - adding support for -k would provide a path for adding CURLOPT_SSL_VERIFYPEER.

However for reasons along the lines of what you have pointed out, I'm uncomfortable adding that flag since in most cases it isn't the right solution.

As a compromise maybe we could support -k but also stick a big warning on the line above.

// WARNING: Disabling certificate verification is insecure and not recommended
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);

@NabiKAZ
Copy link
Contributor

NabiKAZ commented Mar 6, 2021

I agree with detect -k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants