Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CertificateException: No name matching <hostname> found.

 
Aodhan Hoffman
Ranch Hand
Posts: 35
Java MyEclipse IDE Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to access a web service that uses BASIC Auth + SSL with a self-signed cert. I've cobbled together code that should work, and imported the cert from the server into a keystore. I have verified that the CN for the crt is identical to the target hostname and matches exactly what CertificateException is telling me it needs. I've hit a brick wall here and would appreciate any assistance an SSL veteran can provide. Thanks!



code:


and the certs in my keystore


 
Bharat Kasodariya
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your cn name should match with your host name
 
Aodhan Hoffman
Ranch Hand
Posts: 35
Java MyEclipse IDE Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I am aware the hostname lab-nf-01.ns.cs.boeing.com must match the CN lab-nf-01.ns.cs.boeing.com.
They do, which is why the error is so frustrating and unhelpful.
 
Mitch Britton
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try using a hostname verifier:


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic