razorpay / razorpay-ruby

Razorpay Ruby SDK
https://rubygems.org/gems/razorpay
MIT License
64 stars 59 forks source link

OpenSSL error on OS X #6

Closed mrudult closed 8 years ago

mrudult commented 8 years ago

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

Tried almost everything. Updating certs from RVM, Homebrew as well as reinstall Ruby with RVM.

captn3m0 commented 8 years ago

Thanks for the report. I'll take a look at this. If you could give your Ruby, rvm, and OS X versions that would be nice.

mrudult commented 8 years ago

Ruby - ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14] RVM - rvm 1.26.11 (latest) OS X - 10.11.3 (15D21)

captn3m0 commented 8 years ago

Thanks a lot. I'm able to reproduce the bug with the same Ruby version. Will take a look tomorrow and figure out why it's failing.

mrudult commented 8 years ago

It works fine on Ubuntu with the same Ruby version.

captn3m0 commented 8 years ago

I'm going to bundle the ca-certificate file since it seems httparty can't find it reliably on OS X.

mrudult commented 8 years ago

Alternatively, why not provide an option of verify: false in the HTTParty request option.

captn3m0 commented 8 years ago

That is terribly insecure.

mrudult commented 8 years ago

It works now! Thanks for the quick patch.

Can you publish the updated gem?

captn3m0 commented 8 years ago

I'm currently working on Ruby SDK support for the new orders API that we just announced. I'll release the updated gem with both tonight.

captn3m0 commented 8 years ago

Just published 1.1.0: https://rubygems.org/gems/razorpay