Skip to content

Instantly share code, notes, and snippets.

@claudijd
Created June 28, 2013 14:28
Show Gist options
  • Save claudijd/5885084 to your computer and use it in GitHub Desktop.
Save claudijd/5885084 to your computer and use it in GitHub Desktop.
OpenSSL no verify, no cert store IRB example
>> require 'socket'
=> true
>> require 'openssl'
=> true
>>
?> ssl_context = OpenSSL::SSL::SSLContext.new
=> #<OpenSSL::SSL::SSLContext:0x007f8b53049058>
>> tcp_client = TCPSocket.new 'server.trustwave.com', 443
=> #<TCPSocket:fd 5>
>> ssl_client = OpenSSL::SSL::SSLSocket.new tcp_client, ssl_context
=> #<OpenSSL::SSL::SSLSocket:0x007f8b53058120>
>> ssl_client.connect
=> #<OpenSSL::SSL::SSLSocket:0x007f8b53058120>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment