This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try using a hostname verifier:


 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic