0 Replies Latest reply on Jan 27, 2004 3:30 AM by Joyce Stack

    Digital Certificates configuration.

    Joyce Stack Newbie


      Need some help plz. I am able to connect to https://localhost:8443 on my JBoss. My problem now is certifcates etc.

      Here is the contents of my keystore. It has also got a self issued certificate contained in it.

      E:\SSL\keys>keytool -list -v -keystore localhost.keystore
      Enter keystore password: localhost

      Keystore type: jks
      Keystore provider: SUN

      Your keystore contains 1 entry

      Alias name: localhost
      Creation date: 26-Jan-2004
      Entry type: keyEntry
      Certificate chain length: 1
      Owner: CN=Joyce Stack, OU=digisoft, O=digisoft, L=Cork, ST=Cork, C=IE
      Issuer: CN=Joyce Stack, OU=digisoft, O=digisoft, L=Cork, ST=Cork, C=IE
      Serial number: 40155d7c
      Valid from: Mon Jan 26 18:33:32 GMT 2004 until: Sun Apr 25 19:33:32 BST 2004
      Certificate fingerprints:
      MD5: 8A:D5:E8:77:E8:A0:4D:10:1B:A8:F8:16:F4:1C:28:38
      SHA1: 92:32:6D:10:AD:E9:E9:81:20:1A:A3:7B:B6:54:41:58:60:06:A4:21

      I only need to make a ssl connection based on some boolean.
      So I dont need no client side authetication. The servlet will
      just parse some XML for details and store it in the DB.

      Meanwhile I have a little Java client that just makes a URL connection to https://localhost:8443 and i keep getting
      the following error java.io.IOException: HTTPS hostname wrong: should be ( see attached logs ). Is their
      something I should be checking for. ??

      Here is my code:-

      Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); System.setProperty("java.protocol.handler.pkgs",
      "com.sun.net.ssl.internal.www.protocol"); System.setProperty("javax.net.debug", "ssl");
      URL url = new URL("https", "localhost", 8443, "");
      BufferedReader in =
      new BufferedReader(new InputStreamReader(url.openStream()));
      String inputLine;

      while ((inputLine = in.readLine()) != null)