收到致命警报:通过SSLHandshakeException发出握手失败我对授权的SSL连接有问题。我已经创建了StrutsAction,它使用客户端授权的SSL证书连接到外部服务器。在“我的操作”中,我试图将一些数据发送到银行服务器,但没有任何运气,因为我的结果是来自服务器的以下错误:error: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure将数据发送到服务器的Action类中的我的方法//Getting external IP from host
URL whatismyip = new URL("http://automation.whatismyip.com/n09230945.asp");
BufferedReader inIP = new BufferedReader(new InputStreamReader(whatismyip.openStream()));
String IPStr = inIP.readLine(); //IP as a String
Merchant merchant;
System.out.println("amount: " + amount + ", currency: " + currency + ", clientIp: " + IPStr + ", description: " + description);
try {
merchant = new Merchant(context.getRealPath("/") + "merchant.properties");
} catch (ConfigurationException e) {
Logger.getLogger(HomeAction.class.getName()).log(Level.INFO, "message", e);
System.err.println("error: " + e.getMessage());
return ERROR;
}
String result = merchant.sendTransData(amount, currency, IPStr, description);
System.out.println("result: " + result);
return SUCCESS;我的商船.属性文件:bank.server.url=https://-servernameandport-/https.cipher=-cipher-keystore.file=-key-.jks
keystore.type=JKS
keystore.password=-password-ecomm.server.version=2.0encoding.source=UTF-8encoding.native=UTF-8这是我第一次认为这是一个证书问题,我将它从.pfx转换为.jks,但是我有相同的错误,没有任何更改。
添加回答
举报
0/150
提交
取消