• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Certificate problem: No subject alternative names present

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

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

reply
    Bookmark Topic Watch Topic
  • New Topic