GithubHelp home page GithubHelp logo

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed about ruby-docs-samples HOT 7 CLOSED

googlecloudplatform avatar googlecloudplatform commented on July 24, 2024
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

from ruby-docs-samples.

Comments (7)

blowmage avatar blowmage commented on July 24, 2024 2

This is a common error when ruby is missing the needed SSL certificate configuration. Most ruby installers will add this configuration, but it looks like your install is missing it. The easiest way to resolve this is to check for a SSL_CERT_FILE environment variable. If it is missing, then adding it (and the certificate file it points to) should fix this.

Here are some Stack Overflow questions that may help

http://stackoverflow.com/questions/4528101/ssl-connect-returned-1-errno-0-state-sslv3-read-server-certificate-b-certificat
http://stackoverflow.com/questions/37336526/getting-ssl-error-in-ruby-on-windows

from ruby-docs-samples.

beccasaurus avatar beccasaurus commented on July 24, 2024

/cc @blowmage

from ruby-docs-samples.

beccasaurus avatar beccasaurus commented on July 24, 2024

Thanks @blowmage!

@niaomingjian What did you use to install Ruby on your machine?

Google search also turned up this recent post which may help
https://superdevresources.com/ssl-error-ruby-gems-windows/

from ruby-docs-samples.

niaomingjian avatar niaomingjian commented on July 24, 2024

@remi I used RubyInstaller to install Ruby 2.3.1.

I tried those solutions before, but they didn't work.

I tried again., downloaded SSL certificate(cacert.pem), put it in Ruby23-x64\lib\ruby\2.3.0\rubygems\ssl_certs directory and set SSL_CERT_FILE environment variable.

Though I could install jekyll successfully, running this datastore example still got that error.

Even I uninstalled Ruby and reinstall it again. I still can't solve this problem.

from ruby-docs-samples.

blowmage avatar blowmage commented on July 24, 2024

Can you post the full backtrace? Datastore uses GRPC to connect to the API, but the error you are reporting is coming from Faraday, and I'm not sure what is using Faraday.

What version of google-cloud are you using?

from ruby-docs-samples.

frankyn avatar frankyn commented on July 24, 2024

@niaomingjian can I close this issue? Not sure if this is still an issue moving forward.

from ruby-docs-samples.

jepunband avatar jepunband commented on July 24, 2024

help please ..

msf5 auxiliary(gather/shodan_search) > run

[-] Auxiliary failed: OpenSSL::SSL::SSLError SSL_connect returned=1 errno=0 state=error: certificate verify failed
[-] Call stack:
[-] /opt/metasploit-framework/embedded/lib/ruby/2.4.0/net/protocol.rb:44:in connect_nonblock' [-] /opt/metasploit-framework/embedded/lib/ruby/2.4.0/net/protocol.rb:44:in ssl_socket_connect'
[-] /opt/metasploit-framework/embedded/lib/ruby/2.4.0/net/http.rb:948:in connect' [-] /opt/metasploit-framework/embedded/lib/ruby/2.4.0/net/http.rb:887:in do_start'
[-] /opt/metasploit-framework/embedded/lib/ruby/2.4.0/net/http.rb:876:in start' [-] /opt/metasploit-framework/embedded/lib/ruby/2.4.0/net/http.rb:1407:in request'
[-] /opt/metasploit-framework/embedded/framework/modules/auxiliary/gather/shodan_search.rb:59:in shodan_query' [-] /opt/metasploit-framework/embedded/framework/modules/auxiliary/gather/shodan_search.rb:109:in run'
[*] Auxiliary module execution completed

from ruby-docs-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.