×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    3

    How Can I import tomcat public key into S60 3rd Edition Emulator

    I have developed an J2ME app (unsigned Midlet), which is supposed to connect to a webserver through SSL (HTTPS). I am running the Midlet on S60 3rd Edn Emulator. Midlet tries to open a HTTPS connection, but encounters CertificateException.

    I think I need to install/import the public key of the tomcat (Jboss) web server. but I don't know how can i generate the public key for S60 3rd Edn Emulator and install the public key on the Emulator.

    webserver is basically a JBoss server with a small servlet running on it. I followed the following steps to enable the HTTPS handling in Jboss web server.
    1- I generated keystore for Jboss by following command
    keytool -genkey -alias tomcat -keyalg RSA -keystore test.keystore
    2- I placed the test.keystore in /conf dir and updated the server.xml file to open a (TLS) port 8484 for accepting HTTPS requests.
    3- I am able to GET https://localhost:8484 through my windows IE.

    I am sure it is a small thing to many of you guys, I am new to J2ME... So please help me out I am banging my head for quite some time.

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    2

    Re: How Can I import tomcat public key into S60 3rd Edition Emulator

    I am also facing the issue. Are u getting an exception like this , I followed the same steps like you did. This is the code I used to connect to my tomcat by https.

    try {
    // Query the server and retrieve the response.
    HttpsConnection hc = (HttpsConnection)Connector.open("https://127.0.0.1:8443/secureapp");
    SecurityInfo si = hc.getSecurityInfo();
    Certificate c = si.getServerCertificate();
    String subject = c.getSubject();

    String s = "Server certificate subject: \n" + subject;
    Alert a = new Alert("Result", s, null, null);
    a.setTimeout(Alert.FOREVER);
    mDisplay.setCurrent(a, form);
    hc.close();
    }
    catch (Exception ioe) {
    Alert a = new Alert("Exception", ioe.toString(), null, null);
    a.setTimeout(Alert.FOREVER);
    System.out.println(ioe.toString());
    mDisplay.setCurrent(a, form);
    }

    I got an exception like javax.microedition.pki.CertificateException: Certificate was issued by an unrecognized entity .

    I am sure we need to import the public key of the keystore into the emulator , I tried to import using keystore manager,but there are some confusions there.. I would be very useful for both of us , if someone could answer this.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

Similar Threads

  1. Problem with S60 3rd Edition emulator in textshell mode
    By jasoneverson in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2008-07-01, 10:21
  2. S60 3rd Edition Emulator IP stack - When will it use the Symbian IP stack again?
    By cdavies in forum Tools and SDK Feedback (Closed)
    Replies: 3
    Last Post: 2008-06-27, 21:45
  3. S60 3rd edition emulator no app seen
    By 76Richard76 in forum Symbian
    Replies: 8
    Last Post: 2007-11-13, 18:55
  4. Replies: 0
    Last Post: 2007-10-12, 20:04
  5. S60 3rd Edition Emulator under Netbeans 5.5 ?
    By Tiger79 in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-05-02, 13:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×