Flowdock
method

start_tls_session

Importance_0
v2_5_5 - Show latest stable - 0 notes - Class: Net::FTP
start_tls_session(sock) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/net/ftp.rb, line 343
    def start_tls_session(sock)
      ssl_sock = SSLSocket.new(sock, @ssl_context)
      ssl_sock.sync_close = true
      ssl_sock.hostname = @host if ssl_sock.respond_to? :hostname=
      if @ssl_session &&
          Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout
        # ProFTPD returns 425 for data connections if session is not reused.
        ssl_sock.session = @ssl_session
      end
      ssl_socket_connect(ssl_sock, @ssl_handshake_timeout || @open_timeout)
      if @ssl_context.verify_mode != VERIFY_NONE
        ssl_sock.post_connection_check(@host)
      end
      return ssl_sock
    end
Register or log in to add new notes.