curl-library
[Perl Bindings] ftp-connection (ssl/tls) with WWW::Curl::Easy
Date: Tue, 6 Nov 2007 16:41:06 +0100
Hello!
I using the command [1] to establish a tls secured ftp connection.
The command is working to my satisfaction.
Now i would like to write a perl script using WWW::Curl::Easy. My
script is basically working, but the ftp connection is not using
tls!
| #!/usr/bin/perl
| use WWW::Curl::Easy;
| my $curl = new WWW::Curl::Easy;
| $curl->setopt(CURLOPT_TIMEOUT, 20);
| $curl->setopt(CURLOPT_CONNECTTIMEOUT, 15);
| $curl->setopt(CURLOPT_VERBOSE, TRUE);
| $curl->setopt(CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
| $curl->setopt(CURLOPT_FTPSSLAUTH, CURLFTPAUTH_TLS);
| $curl->setopt(CURLOPT_URL, "ftp://192.168.0.10:21");
| $curl->setopt(CURLOPT_USERPWD, "a:b");
| $curl->perform;
If i configure my ftpd to allow only tls secured connections, i'm
not able to connect. The same problem is described in [2].
I have installed the following libraries:
libcurl3 7.15.5-1
libcurl3-gnutls 7.15.5-1
libwww-curl-perl 3.02-2
The options 'CURLOPT_USE_SSL' and 'CURLOPT_FTPSSLAUTH' seem not
to have any effect! How can i fix this problem?
I insist on using libcurl as i don't want to call the curl binary
out of my perl script.
Thanks for your answers!
Kind regards,
Robert
-- [1] curl -v --ftp-ssl --insecure ftp://a:b@192.168.0.10:21 [2] http://curl.haxx.se/mail/lib-2006-02/0027.htmlReceived on 2007-11-06