Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 255 Vote(s) - 3.6 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

#1
I am using [Authlogic-Connect][1] for third party logins. After running appropriate migrations, Twitter/Google/yahoo logins seem to work fine but the facebook login throws exception:

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

The dev log shows

OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed):
app/controllers/users_controller.rb:37:in `update'
Please suggest..

[1]:

[To see links please register here]

Reply

#2
Then, as this blog post suggests,

"[How to Cure Net::HTTP’s Risky Default HTTPS Behavior][1]"

you might want to install the `always_verify_ssl_certificates` gem that allow you to set a default value for `ca_file`.


[1]:

[To see links please register here]

Reply

#3
Here's what I did that helped if you are specifically having a problem on Leopard.

My cert was old and needed to be updated. I downloaded this:

[To see links please register here]


Then replaced my cert which was found here on Leopard:

/usr/share/curl/curl-ca-bundle.crt

Reload whatever you have that's accessing it and you should be good to go!
Reply

#4
Just because instructions were a slight bit different for what worked for me, I thought I add my 2 cents:

I'm on OS X Lion and using macports and rvm

I installed curl-ca-bundle:

sudo port install curl-ca-bundle

Then I adjusted my omniauth config to be this:

Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, APP_CONFIG['CONSUMER_KEY'], APP_CONFIG['CONSUMER_SECRET'],
:scope => 'https://www.google.com/m8/feeds

[To see links please register here]

',
:ssl => {:ca_path => "/share/curl/curl-ca-bundle.crt"}
end
Reply

#5
Well this worked for me

rvm pkg install openssl
rvm reinstall 1.9.2 --with-openssl-dir=$rvm_path/usr


Something is wrong with openssl implementation of my ubuntu 12.04
Reply

#6
The issue is that ruby can not find a root certificate to trust. As of 1.9 ruby checks this. You will need to make sure that you have the curl certificate on your system in the form of a pem file. You will also need to make sure that the certificate is in the location that ruby expects it to be. You can get this certificate at...

[To see links please register here]


If your a RVM and OSX user then your certificate file location will vary based on what version of ruby your using. Setting the path explicitly with :ca_path is a BAD idea as your code will not be portable when it gets to production. There for you want to provide ruby with a certificate in the default location(and assume your dev ops guys know what they are doing). You can use dtruss to work out where the system is looking for the certificate file.

In my case the system was looking for the cert file in

/Users/stewart.matheson/.rvm/usr/ssl/cert.pem

however MACOSX system would expect a certificate in

/System/Library/OpenSSL/cert.pem

I copied the downloaded cert to this path and it worked. HTH
Reply

#7
The new certified gem is designed to fix this:

[To see links please register here]

Reply

#8
This worked for me. If you using rvm and brew:

rvm remove 1.9.3
brew install openssl
rvm install 1.9.3 --with-openssl-dir=`brew --prefix openssl`
Reply

#9
OSX solution:

install latest rvm stable version

rvm get stable

use rvm command to solve the certificates automatically

rvm osx-ssl-certs update all

Reply

#10
Ruby can't find any root certificates to trust.

Take a look at this blog post for a solution: "[Ruby 1.9 and the SSL error][1]".

[1]:

[To see links please register here]


> The solution is to install the `curl-ca-bundle` port which contains the same root certificates used by Firefox:
>
> sudo port install curl-ca-bundle
>
>and tell your `https` object to use it:
>
> https.ca_file = '/opt/local/share/curl/curl-ca-bundle.crt'
>Note that if you want your code to run on Ubuntu, you need to set the `ca_path` attribute instead, with the default certificates location `/etc/ssl/certs`.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through