0

I have a certificate. pfx to access a webservice.

I followed the steps listed on this page

When looking at the xml sent is encrypted.

But the server returns me the message:

The page requires a client certificate
.........
HTTP/1.1 403 Forbidden
.......
Server Microsoft-IIS/6.0

I can see the definition of this server from the browser if I have this certificate installed (the certificate is correct).

Also I have to use username and password to see the definition of service.

In the Trustor I have the server certificate.

I'm programming in java and use axis, any ideas why I am getting this error?

Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
Maria José
  • 87
  • 3
  • 13

2 Answers2

0

You need to configure your Axis client to inclue a client certificate with your outgoing request. This is different from server certificates which are more common. This post gives good info on setting up client certs in Java:

Community
  • 1
  • 1
Raj
  • 2,852
  • 4
  • 29
  • 48
0

This is the solution:

System.setProperty(“javax.net.ssl.keyStore”, “path/keystore.jks”);
System.setProperty(“javax.net.ssl.keyStorePassword”, “pass”);
System.setProperty(“javax.net.ssl.keyStoreType”, “PKCS12″);
System.setProperty(“javax.net.ssl.trustStore”, “path/trusstore.jks”);
System.setProperty(“javax.net.ssl.trustStorePassword”, “pass”);
System.setProperty(“com.sun.net.ssl.dhKeyExchangeFix”, “true”);
Termininja
  • 6,620
  • 12
  • 48
  • 49
Maria José
  • 87
  • 3
  • 13