In: |
openssl/lib/net/protocols.rb
|
Parent: | InternetMessageIO |
# File openssl/lib/net/protocols.rb, line 37 def initialize(addr, port, otime = nil, rtime = nil, dout = nil) super @ssl_context = OpenSSL::SSL::SSLContext.new() end
# File openssl/lib/net/protocols.rb, line 42 def ssl_connect() unless @ssl_context.verify_mode warn "warning: peer certificate won't be verified in this SSL session." @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE end @socket = OpenSSL::SSL::SSLSocket.new(@socket, @ssl_context) @socket.sync_close = true @socket.connect end