jmathai/epiphany

Add SSL support to EpiTwitter / EpiCurl

Closed this issue · 8 comments

I'm looking to implement your library in a Twitter app I am creating but am curious about the lack of SSL support.

I realize that the search API does not need it, but all of the authentication related requests should have the option to use SSL.

Thanks for your work!

I was waiting for someone to request this....but sitting idly until then. Will look into how to best add ssl support. Thanks for opening an issue.

No problem :)

I modified EpiTwitter with the changes I think are necessary. I tried using to fork and push an update, but was having problems - could be a network firewall issue.

I'll email you the changed file.

If you've forked then send me a pull request.

Well, I finally got it figured out - thanks for providing my first Git experience :D

I sent a pull request - take a look and see if it is of any use ;)

Will do. Looks good from what I can tell. Did you not have to add anything to EpiOAuth to add in the associated curl options for the certificate?

I was wondering where the curl options were ;) Compared to some other clients I've looked at, I don't see the following in yours:
CURLOPT_URL
CURLOPT_CONNECTTIMEOUT
CURLOPT_TIMEOUT

Aside from that, the only SSL related one I see is:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

Which as far as I can tell, bypasses any SSL verification.

I'm not an expert on curl options, so I hope you would know better if any of those are needed. ;)

Yea, I'll add them. The curl stuff is in EpiOAuth. I don't currently have anything in there for any timeouts. I guess I can add them in while I'm adding the SSL options. Will close this issue out when I commit the changes so you should recieve an email.

Merging in emmartin's changes and moving ssl logic into EpiOAuth class.
Closed by c180f0a915db9bb744029bdc4715997dc205c770