aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Certificate problem: No subject alternative names present Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Certificate problem: No subject alternative names present" Watch "Certificate problem: No subject alternative names present" New topic
Author

Certificate problem: No subject alternative names present

David Acevedo
Greenhorn

Joined: Feb 12, 2010
Posts: 15
Hello,
I am having some troubles with a self-signed certificate that was given to me to allow my application to use some web services.

I installed the certificate in the operating system (Windows) and in the keystore cacerts.jks in glassfish.
When I try to consume the webservice I am getting the next error:

Error:com.sun.xml.ws.client.ClientTransportException: HTTP transport
error: javax.net.ssl.SSLHandshakeException:
java.security.cert.CertificateException: No subject alternative names present


I have spent more than 5 days looking for a solution but I do not know what can I do.

I read that the problem usually appears when the "cn" in the certificate does not match the address of the server.
The "CN" in my certificate is "PRESS44"
The server address that was given to me is an ip. https://xxx.xxx.xxx.xxx:123

I have read in different forums that I have to regenerate the certificate and change the cn to make it match with the
domain name of the server, in this case to make it match with the ip, but I cannot do it because I cannot change the
certificate.
I have called to the company who gave the certificate but they told that it was right, and that several people was using the
same certificate successfully.

I also tried to access the server address from the browser, and it shows me a message telling me that there is a problem
with the current certificate. It shows an error that says "mismatched address".

Thanks in advance for your help.

BR

David



David Acevedo
Greenhorn

Joined: Feb 12, 2010
Posts: 15
I found the solution:
This is a solution that only applies in a development environment and when it is a self-signed certificate.
Do not use it in a production environment.

http://www.coderanch.com/t/134384/Security/Getting-error-No-subject-alternative

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Certificate problem: No subject alternative names present