iphone - iOS: FTP TLS Connection -


i need ftp tls connection iphone-app. normal ftp-connection works fine. need secure tls connection. used code apple´s simpleftpsample iphone:

ftpstream = cfreadstreamcreatewithftpurl(null, (cfurlref) url); self.networkstream = (nsinputstream *) ftpstream;  [self.networkstream retain]; self.networkstream.delegate = self;   cfreadstreamsetproperty((cfreadstreamref)self.networkstream, kcfstreampropertyftpusername, (cfstringref)@"ftpuser"); cfreadstreamsetproperty((cfreadstreamref)self.networkstream, kcfstreampropertyftppassword, (cfstringref)myftppassword);   [self.networkstream scheduleinrunloop:[nsrunloop mainrunloop] formode:nsdefaultrunloopmode]; [self.networkstream open]; 

this works fine normal ftp connection.

but how setup tls connection? i´m not sure need , if tls connection works?

i tried code:

nsmutabledictionary *settings = [nsmutabledictionary dictionarywithcapacity:5]; [settings setobject:(nsstring *)nsstreamsocketsecurityleveltlsv1 forkey:(nsstring *)kcfstreamssllevel]; [settings setobject:[nsnumber numberwithbool:yes] forkey:(nsstring *)kcfstreamsslallowsanyroot]; cfreadstreamsetproperty((cfreadstreamref)self.networkstream, kcfstreampropertysslsettings, (cftyperef)settings); 

but without success. please can me. need ftp tls connection protected ftp username , ftp password.

thanks!

when "ftp tls" assume mean rfc 4217? i'm cfstream doesn't support protocol. you'll have build yourself. may want @ libcurl solution. i've been reasonably happy managing tftp.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -