Getting javax.microedition.pki.CertificateException:Certificate does not co

Hi all

I抦 trying to apply SSL (HTTPS) to a midlet to servlet communication model using Tomcat 4.0.6., wirless toolkit 2.2 and SDK SE v1.4.2_07.

I抦 following a tutorial by Qusay H. Mahmoud available at:

http://developers.sun.com/techtopics/mobility/midp/articles/https/

Problem is when i run the midlet i get the following exception when attempting to connect to the servlet:

javax.microedition.pki.CertificateException:Certificate does not contain the correct site name

I've generated the certificates in accordance to the tutorial, but the problem persists.

Any help on this would be very gratefully received.

Thanks in Advance

Greig

[710 byte] By [Greig_Roboa] at [2007-10-1 8:09:53]
# 1

Hi man,

I've the same problem and found was going on.

When connecting to a secure server, the Https implementation

checks that the hostname in the URL used to contact the site

matches a hostname or shell expression hostname pattern in the

CN (Common Name) field of the Subject Name of the site certificate.

So, when you are creating your new certificates put the CN as your hostname... in this case 127.0.0.1

Hello Brazil,

Alcides Flach

alcidesflacha at 2007-7-9 21:11:28 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...