>I have imported the certificate into the cacerts file via keytool -import.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
>>I have imported the certificate into the cacerts file via keytool -import.
>
> If you check your machine, there may be dozens of cacerts files. Make
> sure you have the right one. See
> http://mindprod.com/jgloss/cacerts.html
I am sure I have the right imported into correct cacerts file.
The problem is that, normally, even for a development server with a
self-signed server certificate, the CN on the server certificate matches
the hostname the development server URL. But in this case, the CN does not
match, and hence, importing it into the server certificate into cacerts
file will not work.
I have worked around this for now by using overriding a TrustManager to
trust the server no matter what.
Roedy Green - 13 Dec 2005 02:10 GMT
>The problem is that, normally, even for a development server with a
>self-signed server certificate, the CN on the server certificate matches
[quoted text clipped - 4 lines]
>I have worked around this for now by using overriding a TrustManager to
>trust the server no matter what.
This is as it should be. Otherwise you could buy a cert for company A
then use it all over the place where it was not certified.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Chris Smith - 13 Dec 2005 15:29 GMT
> This is as it should be. Otherwise you could buy a cert for company A
> then use it all over the place where it was not certified.
I hope you don't expect us to cry over potential lost revenue for
Verisign...
In any case, the point behind verifying the CN on a server certificate
is that you protect against man-in-the-middle attacks, in which a router
or DNS server is compromised so that when the user tries to visit
www.paypal.com, they are actually redirected over to a different site
instead. Since Verisign (or Thawte, or whoever) supposedly won't issue
a certificate with a CN of "www.paypal.com" except to the owner of that
site, the attacker would be unable to obtain a certificate with the
correct CN.

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation