OpenSSL::SSL Error

Briefly describe your issue below:
hi i’m getting openssl error in metasploit
Auxiliary failed: OpenSSL::SSL::SSLError SSL_connect returned=1 errno=0 state=error: certificate verify failed

What version of Parrot are you running? (include version, edition, and architecture)
Linux parrot 4.19.0-parrot1-13t-amd64 #1 SMP Debian 4.19.13-1parrot1.13t (2019-01-09) x86_64 GNU/Linux
What method did you use to install Parrot? (Debian Standard / Debian GTK / parrot-experimental)
debian standard
Configured to multiboot with other systems? (yes / no)
yes
If there are any similar issues or solutions, link to them below:
tried this but did not work :

curl https://curl.haxx.se/ca/cacert.pem -o "$(ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE')"

If there are any error messages or relevant logs, post them below:

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:inssl_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:indo_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:inrequest’
[-] /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:inrun’
[*] Auxiliary module execution completed

OpenSSL::SSL::SSLError SSL_connect returned=1 errno=0 state=error: certificate verify failed

That means that you try to make ssl connection to untrusted certificate.

curl https://curl.haxx.se/ca/cacert.pem -o "$(ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE')"

This cant help you since you probably aren’t connecting to https://curl.haxx.se
So maybe get the right certificate?

followed a tutorial here:
https://bundler.io/v1.16/guides/rubygems_tls_ssl_troubleshooting_guide.html#troubleshooting-certificate-errors
i did gem install bundler & gem update --system & updated the system clock but still the same …

You dont have to trubleshoot ruby or your clocks this wont help you if they use certificate from untrusted authority. You have to make your system think ablout it as trusted certificate.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.