ColdFusion FTP显式TLS [英] ColdFusion FTP Explicit TLS

查看:296
本文介绍了ColdFusion FTP显式TLS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用显式TLS执行ColdFusion FTP连接?

Is it possible to do a ColdFusion FTP connection using Explicit TLS?

我在Google上搜索但无效。

I have searched on Google but to no avail.

推荐答案

Apache Commons有一个 FTPSClient 类,我认为它已经在Coldfusion的更高版本中提供。

The Apache Commons has an FTPSClient class as well, and I think it is already available in the later versions of Coldfusion.

只是添加一个例子。它使用我发现可用的测试服务器。我使用的是CF 9.0.2,不需要下载任何额外的jar。

Just adding an example. It uses a test server that I found available. I am using CF 9.0.2, and did not have to download any additional jars.

ftpsClient = CreateObject("java","org.apache.commons.net.ftp.FTPSClient").init(JavaCast("boolean",true));
ftpsClient.connect(JavaCast("string","ftp.secureftp-test.com"),990);
connected = ftpsClient.isConnected();

WriteOutput("Is Connected:" &  connected & '<br/>');

login = ftpsClient.login('test','test');
WriteOutput("Is Logged in:" &  login & '<br/>');


ftpsClient.logout();
ftpsClient.disconnect();
connected = ftpsClient.isConnected();

WriteOutput("Is Connected:" &  connected & '<br/>');

这篇关于ColdFusion FTP显式TLS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆