curl-and-python
Re: Using PyCurl to connect to a FTP with TLSv1 ?
Date: Sat, 23 Dec 2006 01:39:03 -0500
> Thanks for the heads up, that makes it easier indeed :)
>
> My current code looks like this now:
>
> --- SNIP ---
> c = pycurl.Curl()
> c.setopt(pycurl.SSL_VERIFYPEER, 0)
> c.setopt(pycurl.SSLVERSION, 3)
> c.setopt(pycurl.URL, 'ftp://'+SERVER+ ':'+ PORT +DIRTOCHECK)
> c.setopt(pycurl.USERPWD, USERPASS)
> try:
> c.perform()
> print c.getinfo(pycurl.EFFECTIVE_URL)
> c.close()
> except pycurl.error, message:
> print message
> --- SNAP ---
>
> ... and always uses non-SSL Logins (which get denied), any idea how to
> force pyCurl to go for FTP and TLSv1 directly ?
>
> Cheers,
> Stefan
Look at the CURLOPT_FTP_SSL and CURLOPT_FTPSSLAUTH options in the
curl_easy_setopt docs
Nathan E. Moore
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2006-12-23