hanklords / flickraw

Ruby library to access flickr api.
http://hanklords.github.com/flickraw/
MIT License
507 stars 98 forks source link

SSL exception #81

Closed phlegx closed 6 years ago

phlegx commented 10 years ago

When I try to upload I get the following exception:

Exception: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

Not sure why this is happening. Any ideas?

gep13 commented 10 years ago

@hankloards I have been receiving this same error message having started trying to use the flickraw library for a new Octopress Website. I have received this error message on two separate Windows PC's and a Windows Server. Are you able to shed any light on might be going on here, and any suggestions as to how to proceed?

Thanks!

gep13 commented 10 years ago

@phlegx did you ever find a solution to this problem? Were you running on a Windows machine?

hanklords commented 10 years ago

I still have to look into it. When I have some more time.

gep13 commented 10 years ago

@hanklords thanks for getting back to me. I have a couple things to try out, and if I get anywhere, I will let you know. Thanks!

gep13 commented 10 years ago

Using a friends MacBook, I ran the exact same test that I had done on my Windows machine, and the Flickr Authentication worked without any problems. So this looks like it is specifically an issue on Windows. Would you have any suggestions about how to proceed with correcting this issue?

Thanks!

Spaceghost commented 10 years ago

@gep13 Unless you're targeting Windows as your deployment platform, I'd suggest using linux or a VM with linux. I don't say this to deter you from investigating your issue, but with the intent to reveal other options.

hanklords commented 10 years ago

Thanks for investigating, i will try on a windows box.

gep13 commented 10 years ago

@Spaceghost thanks for the suggestion, however, I don't see how I can move away from Windows. I use Windows as my primary development machine, and I use AppVeyor (which uses Windows) as a mechanism to build the resulting static pages of my blog, which runs on GitHub Pages, so I can't get away from it. Plus, since I use Windows day to day, I would always want my site to generate on my local machine for testing, even if I was deploying to a Linux host.

Also, I chose, in my case Octopress (running on top of Jekyll, running on top of Ruby) primarily because of it's cross platform capabilities, but it looks like there are issues with Ruby on Windows.

gep13 commented 10 years ago

@hanklords thanks! Seems that this StackOverflow post is at the heart of the problem, but I have tried all the suggested solutions, and nothing seems to work for me:

http://stackoverflow.com/questions/23263121/ruby-ssl-with-twitter-failed-on-cert-openssl-issue-on-windows-7

gep13 commented 10 years ago

@pweldon I don't suppose that you are able to help out with this problem are you?

I noticed that you had a gist that talked about the same problem, located here:

https://gist.github.com/pweldon/767249

I can use the commands in this gist to correct the issue for the URL that you mention, namely https://www.google.com/accounts, however, when I try to use the Flickr URL, i.e. https://api.flickr.com/services/, I continue to get the same SSL Error that I was getting for the Google URL before I set the SSL_CERT_FILE.

Do you have any ideas about how to proceed? Thanks!

pweldon commented 10 years ago

Flicker url seems to require an old Verisign root certificate which is not included in the curl.haxx.se cert bundle.

You can get the cert here: http://www.symantec.com/content/en/us/enterprise/verisign/roots/Class-3-Public-Primary-Certification-Authority.pem

And more details here:

HTH

gep13 commented 10 years ago

@pweldon wow! I don't know what to say! I have been banging my head against this problem for about 2 weeks, and this worked a treat! :-)

If you don't mind me asking, how were you able to figure this out?

I really appreciate your help!

jamesjohnmcguire commented 9 years ago

I tried installing Class-3-Public-Primary-Certification-Authority.pem with no luck. Still going on with ruby 2.1.1.6p336.

joelxr commented 8 years ago

Hello, I had the same problem and I couldn't fix this out. I'm using windows machine too.

[]s

gep13 commented 8 years ago

@joelxr these are the steps I am following on my AppVeyor CI Build:

https://github.com/adnuguk/adnuguk.github.io/blob/source/appveyor.yml#L37

To work around this problem. Hope that helps!