On Jan 9, 7:14 pm, RobboRex <[email protected]> wrote:
>
> SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
> certificate verify failed
>
> I've had it before and fixed it by downloading certificates and
> setting the path but that was using omniauth-facebook and on linux.
> Please don't tell me to use linux, its not possible right now.
>

Same as covered here for Mechanize:

http://stackoverflow.com/questions/8567973/why-does-accessing-a-ssl-site-with-mechanize-on-windows-fail-but-on-mac-work/8568915#8568915

Applies to OmniAuth (0.2.6 and Rails 2.3.14 in this example)

ca_file = File.expand_path Rails.root.join("config", "cacert.pem")

ssl_options = {}
ssl_options[:ca_path] = '/etc/ssl/certs' if Rails.env.staging?
ssl_options[:ca_file] = ca_file

ActionController::Dispatcher.middleware.use OmniAuth::Builder do
  provider :facebook, $omniauth[:facebook_app_id],
$omniauth[:facebook_app_secret],
    :scope => $omniauth[:facebook_scope],
    :client_options => { :ssl => ssl_options }
end

The principle is the same for newer version of OmniAuth. You just need
the cert bundle.

--
Luis Lavena

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to