2012-06-07 21 views
0

我是ftps.me的新手,我使用zehon库来使用FTPS协议传输文件。我有一个verisigned证书。这里是我的代码片段:使用java(zehon)通过FTPS协议传输文件时无效的密钥库格式

FTPsClient ftpClient = new FTPsClient(host, port,username ,password ,false,keyStorePath,keyStorePass); // should it be true or false?? i.e. the isImplicit method 
int status = ftpClient.sendFile(filename, ftpsFolder); 

我已验证用户名pwd,主机和其他详细信息。唯一不确定的是密钥库文件是证书文件。我已经提到了密钥库路径为C:\ keystorefile.crt。 运行此程序时出现无效的密钥库格式。那么我的证书应该采用什么样的格式呢?有没有zehon需要的特定类型?

+0

我的当前证书已被配置,以便它将被apache接受 – justin3250

回答

0

我正在提供证书文件,因此程序需要一个密钥库及其密码。创建密钥库并提供其路径解决了问题。这里是如何创建并将密钥库放入你的证书的链接:

http://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html 
相关问题