Class: Net::FTPTLS

Inherits:
FTP
  • Object
show all
Defined in:
lib/net/ftptls.rb

Instance Method Summary collapse

Instance Method Details

#login(user = "anonymous", passwd = nil, acct = nil) ⇒ Object



32
33
34
35
36
37
38
39
40
41
# File 'lib/net/ftptls.rb', line 32

def (user = "anonymous", passwd = nil, acct = nil)
   ctx = OpenSSL::SSL::SSLContext.new('SSLv23')
   ctx.key = nil
   ctx.cert = nil
   voidcmd("AUTH TLS")
   @sock = OpenSSL::SSL::SSLSocket.new(@sock, ctx)
   @sock.connect
   super(user, passwd, acct)
   voidcmd("PBSZ 0")
end