我正在尝试连接在linux环境中运行在Tibco中的https服务器。我使用jdk 1.6.0在linux环境中创建了密钥库。
现在我想要一个独立的http(s)客户端连接到服务器。我已将生成的密钥库(psaserver.keystore)和证书(psaserver.cer)下载到Windows本地系统。我在本地系统中的jdk版本也是1.6。
但是当我尝试连接时,我收到了这个错误:
Mar 31, 2011 7:14:03 PM com.sa.http.ssl.AuthSSLProtocolSocketFactory createSSLContext
SEVERE: Invalid keystore format
java.io.IOException: Invalid keystore format
at com.sa.http.ssl.AuthSSLProtocolSocketFactory.createKeyStore(AuthSSLProtocolSocketFactory.java:137)
at com.sa.http.ssl.AuthSSLProtocolSocketFactory.createSSLContext(AuthSSLProtocolSocketFactory.java:192)
at com.sa.http.ssl.AuthSSLProtocolSocketFactory.getSSLContext(AuthSSLProtocolSocketFactory.java:256)
at com.sa.http.ssl.AuthSSLProtocolSocketFactory.createSocket(AuthSSLProtocolSocketFactory.java:293)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at com.sa.sim.GenericHTTPClient.run(GenericHTTPClient.java:76)
at java.lang.Thread.run(Unknown Source)
我已经完成了有关同一问题的查询。通过多次创建密钥来重新编写密钥,但它不起作用。
答案 0 :(得分:0)
似乎是ftp传输模式的问题。我现在用二进制模式完成它并且它工作正常。
谢谢, Brinal