Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

How to tell Async::IO::SSLEndpoint#connect to not verify the certificate? #84

Closed Answered by postmodern
postmodern asked this question in Q&A
Discussion options

You must be logged in to vote

Hmm, after passing in a custom OpenSSL::SSL::SSLContext with verify_mode set to OpenSSL::SSL::VERIFY_NONE, it appears that I'm actually hitting some kind of odd SSL/TLS handshake failure that also happens when using SSLSocket or even curl.

context = OpenSSL::SSL::SSLContext.new
context.verify_mode = OpenSSL::SSL::VERIFY_NONE

host = '172.66.40.156'
port = 8443
endpoint = Async::IO::Endpoint.ssl(address,port, ssl_context: context)

endpoint.connect do |socket|
  # ...
end
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 peeraddr=172.66.40.156:8443 state=error: ssl/tls alert handshake failure
$ curl -k https://172.66.40.156:8443
curl: (35) OpenSSL/3.2.1: error:0A000410:SSL routines::…

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
8 replies
@postmodern
Comment options

@ioquatix
Comment options

@postmodern
Comment options

@ioquatix
Comment options

@postmodern
Comment options

Comment options

You must be logged in to vote
1 reply
@ioquatix
Comment options

Answer selected by postmodern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants