使用java(zehon)通过FTPS协议传输文件时无效的密钥库格式

时间:2012-06-07 13:10:10

标签: java ssl-certificate ftps

我是ftps的新手。我正在使用zehon库使用FTPS协议传输文件。我有一份verisigned证书。这是我的代码片段:

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需要一种特定的格式吗?

1 个答案:

答案 0 :(得分:0)

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

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