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

Elastica_Transport_Https #106

Closed
rayward opened this issue Nov 24, 2011 · 6 comments
Closed

Elastica_Transport_Https #106

rayward opened this issue Nov 24, 2011 · 6 comments

Comments

@rayward
Copy link
Contributor

rayward commented Nov 24, 2011

This transport is setting the following curl option:

curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, false);

This causes connections to be insecure as it won't verify the peers certificate. It allows connections to servers with invalid or expired certificates.

You should set this to true.

@ruflin
Copy link
Owner

ruflin commented Nov 24, 2011

@rayward: You are right. This is quite a security issue. We should set it to true by default
@maeti: In general, good idea with the flag. But is it a good idea in general to allow not verified? I see the usecase more in a testing environment.

There are additional flag we should take into account:

curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);

But than we have to use CURLOPT_CAPATH option to add certs:

curl_setopt($curl, CURLOPT_CAPATH, 'cert.pem');

What you think is best?

@plaflamme
Copy link

I'd suggest accepting the curl options as a parameter when constructing the client. CURL has literally tens (if not a hundred) of options. You don't want to pick and choose the ones you want. Simply allow passing-through curl opts.

@ruflin
Copy link
Owner

ruflin commented Jan 3, 2012

Very good idea. Does anyone have time to implement that? That also fits the general Elastica approach. Allow "everything" through a general API, but also implement some often used features more specific.

@ruflin
Copy link
Owner

ruflin commented Jan 8, 2012

Now it is possible to set curl params in the config (see commit ba88bd0)

#107

@lavoiesl
Copy link
Contributor

Can this issue be closed then ?

@ruflin
Copy link
Owner

ruflin commented Jul 26, 2012

Closed

@ruflin ruflin closed this as completed Jul 26, 2012
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

4 participants