Sha256: 71af3f80c1f4d40f228d607650aacd95d023f854fbeef5969f09f6e7dc255a59

Contents?: true

Size: 731 Bytes

Versions: 40

Compression:

Stored size: 731 Bytes

Contents

# https://github.com/bnix/double-bag-ftps/issues/17
# implicit に対応するためのパッチ

require 'net/ftp'

module Bizside
  class ImplicitFTPS < Net::FTP
    FTP_PORT = 990

    def connect(host, port = FTP_PORT)
      synchronize do
        @host = host
        @bare_sock = open_socket(host, port)
        begin
          ssl_sock = start_tls_session(Socket.tcp(host, port))
          @sock = BufferedSSLSocket.new(ssl_sock, read_timeout: @read_timeout)
          voidresp
          if @private_data_connection
            voidcmd("PBSZ 0")
            voidcmd("PROT P")
          end
        rescue OpenSSL::SSL::SSLError, Net::OpenTimeout
          @sock.close
          raise
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
bizside-2.3.9 lib/bizside/implicit_ftps.rb
bizside-3.0.3 lib/bizside/implicit_ftps.rb
bizside-2.3.8 lib/bizside/implicit_ftps.rb
bizside-3.0.2 lib/bizside/implicit_ftps.rb
bizside-3.0.1 lib/bizside/implicit_ftps.rb
bizside-3.0.0 lib/bizside/implicit_ftps.rb
bizside-2.3.7 lib/bizside/implicit_ftps.rb
bizside-2.3.6 lib/bizside/implicit_ftps.rb
bizside-2.3.5 lib/bizside/implicit_ftps.rb
bizside-2.3.4 lib/bizside/implicit_ftps.rb
bizside-2.3.3 lib/bizside/implicit_ftps.rb
bizside-2.3.2 lib/bizside/implicit_ftps.rb
bizside-2.3.1 lib/bizside/implicit_ftps.rb
bizside-2.3.0 lib/bizside/implicit_ftps.rb
bizside-2.2.3 lib/bizside/implicit_ftps.rb
bizside-2.2.2 lib/bizside/implicit_ftps.rb
bizside-2.2.1 lib/bizside/implicit_ftps.rb
bizside-2.2.0 lib/bizside/implicit_ftps.rb
bizside-2.1.12 lib/bizside/implicit_ftps.rb
bizside-2.1.11 lib/bizside/implicit_ftps.rb