Net::SSLIO (Class)

In: openssl/lib/net/protocols.rb
Parent: InternetMessageIO

Methods

new   peer_cert   ssl_connect  

Public Class methods

[Source]

# 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

Public Instance methods

[Source]

# File openssl/lib/net/protocols.rb, line 52
    def peer_cert
      @socket.peer_cert
    end

[Source]

# 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

[Validate]