0

We have a simple web application in Java running on WebLogic secured with SSL over https. The name of the server is dev-service1. Access to the web app using a browser with https works fine, however, with a standalone Java client we are getting the following error indicating that the "dev-service1" is not found in the client.jks file.

com.sun.xml.internal.ws.client.ClientTransportException:
HTTP transport error: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException:
No name matching dev-service1 found
   at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:121)

Do we have to export a new client.jks file from the server.jks file using Java's keytool?

3
  • SSL and certificates can be tricky. Is the certificate on the server signed by a well known CA or self-signed? Are you defining a truststore file via VM Arguments? Does the server require client authentication? Commented Apr 8, 2011 at 17:15
  • It's a self-signed certificate. We have access to it. And yes, the server loads the keystore on startup using vm arguments. The server does require authentication, but we're providing the necessary credentials. Commented Apr 8, 2011 at 17:33
  • So the server (Apache or Tomcat or something other) has it's ssl connection setup with Client Authentication? In tomcat the ssl connector has a clientAuth attribute and would be set to either 'want' or 'true' in Apache the directive is SSLVerifyClient and would be set to either 'optional' or 'required'. Commented Apr 8, 2011 at 17:42

1 Answer 1

2

You will need to add the self-signed certificate from the server into your clients truststore.

I would recommend using the InstallCert program that can be found in one of two places.

Quick note. I'm fairly sure that the above programs will NOT add the certificate from the server to your default truststore that ships with java. So you will have to set the -Djavax.net.ssl.trustStore and -Djavax.net.ssl.trustStorePassword VM Arguments in your command line that you use to start your client.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.