对等方未返回证书

时间:2019-02-28 08:08:25

标签: java ssl ssl-certificate

我正在尝试使用SSL在JAVA中调用soap API

System.setProperty("javax.net.ssl.trustStore", "C:\\java\\java6u45\\jre\\lib\\security\\x");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
System.setProperty("javax.net.ssl.trustStoreType", "JKS"); 
System.setProperty("javax.net.ssl.keyStore", "C:\\Users\\user\\Desktop\\SoapUI (1)\\SoapUI\\x.p12");
System.setProperty("javax.net.ssl.keyStorePassword", "passX!");
System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
System.setProperty("https.protocols", "TLSv1");



URL u = null;
try {
    u = new URL("https://x1/x2WS/x3?wsdl");
} catch(Exception ex) {
    ex.printStackTrace();
}
JobInput2Service service = new JobInput2Service(u);
JobInput2 job = service.getJobInput2Port();
try {
    HelloRequestParm parm = new HelloRequestParm();
    parm.setMessage("value");
    HelloResponseData res = job.sayHello(parm);
    System.out.print("\n res: "+res.getMessage());
} catch (Exception ex) {
    ex.printStackTrace();
} 

我在古兰经上得到

I am geting: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

在服务器上  SSL Library Error: error:140890C7:SSL routines:ssl3_get_client_certificate:peer did not return a certificate -- No CAs known to server for verification?

当我使用Java 1.6和TLSv1时为什么使用ssl3?

0 个答案:

没有答案