【发布时间】:2014-09-17 11:29:35
【问题描述】:
我使用此代码通过显式加密连接到 ftps
String host = "10.21.13.66";
int port = 21;
String username = "user";
String password = "pass";
try {
FTPSClient ftpClient = new FTPSClient("ssl",false);
ftpClient.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out)));
ftpClient.connect(host, port);
int reply = ftpClient.getReplyCode();
if (FTPReply.isPositiveCompletion(reply)) {
// Login
(ftpClient.login(username, password))
}
} catch (IOException ioe) {
System.out.println("FTP client received network error");
}
当我尝试连接到我自己的 ftps 时,它返回此错误:431 No security resource for TLS/SSL encryption,可能没有选定的 SSL 证书
任何帮助将不胜感激;
【问题讨论】:
标签: java ssl ftps apache-commons-net