bastardo has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I've been using Net::FTP for a while and it has worked perfectly till now. One of the FTP servers at work is now requiering TLS connections. Any gurus know how i could use Net::FTP with SLL and/or TLS? Sincerely, Bastardo

Replies are listed 'Best First'.
Re: Net::FTP and SSL/TLS
by submersible_toaster (Chaplain) on May 02, 2003 at 06:04 UTC

    Won't LWP handle TLS/SSL if you set it up, you might check the footnote for LWP.

    It would appear you can modify the dataconn class of Net::FTP , which inherits from IO::Socket::INET , with some care you can perhaps fudge it to use IO::Socket::SSL

    PS. IANAG !


    I can't believe it's not psellchecked
Re: Net::FTP and SSL/TLS
by vek (Prior) on May 02, 2003 at 14:20 UTC
    If your goal is just to have a secure FTP connection then may I suggest taking a peek at Net::SFTP.

    -- vek --
      Well, I'm not controlling the servers, and the servers are using SSL and TLS. Afaik Net::SFTP only does SSH, besides that it has no support for FXP (site-to-site tranfers) which is one of the reasons I'm using Net::FTP. I guess modifying Net::FTP to do TLS/SSL would be the best way, but my perl skills are not on that level I'm afraid. Anyone out there with some skills than could be interested in looking at it? bastardo.
        You might want to double check but I believe that Net::SFTP does have FXP support. The Net::SFTP::Constants module appears to import SSH2_FXP_* constants.

        -- vek --
Re: Net::FTP and SSL/TLS
by tstock (Curate) on May 03, 2003 at 05:51 UTC
    I had a similar problem where I wanted to do FTP over SSL. I don't know if this helps but I solved my problem by using a tool called lftp to mirror the FTPS site locally and then using perl to open the already local files.

    Tiago
Re: Net::FTP and SSL/TLS
by Anonymous Monk on May 06, 2003 at 13:02 UTC
    I found a TLS Wrapper which will do the job untill Net::FTP gets updated with TLS/SSL support, it can be found at: http://tlswrap.sunsite.dk/ for those interested. Thanks for all your help. Bastardo.