Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4499983

View cert from signed applet dialog hangs browser, vm

    XMLWordPrintable

Details

    • x86
    • windows_2000

    Description



      Name: pa48320 Date: 09/05/2001

      This actually happens in JDK 1.4 beta 2 but there wasn't a setting for that on the web page.

      IE ocx
      win2k 5.00.2195 service pack 2

      java -version produces:
      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)



      Clicking the View Certificate button on the dialog presented for signed applets causes a hang (browser and Java windows don't repaint or respond).

      Obligatory test case:

      Compile, jar and sign (RSA cert from VeriSign) the following applet:

      import java.applet.*;
      import java.awt.*;
      import java.security.*;
      import javax.swing.*;

      public class HelloApplet extends Applet
      implements PrivilegedAction
      {
      private JLabel m_label;

      public HelloApplet()
      {
      setLayout( new BorderLayout() );
      m_label = new JLabel();
      add(m_label, BorderLayout.CENTER);
      }

      public void start() {
      String text = "Unable to retrieve userid";
      try {
      text = (String) AccessController.doPrivileged(this);
      } catch (SecurityException se) {}
      setHelloText(text);
      }

      private void setHelloText(String text)
      { m_label.setText(text); }

      // implements PrivilegedAction
      public Object run() {
      return "Hello, " + System.getProperty("user.name");
      }
      }

      run the applet in IE via the following (or any suitable) HTML on a machine which has installed Java 1.4 beta 2 (the launching HTML is irrelevant):

      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
      <HTML>
      <HEAD>
      <TITLE>d</TITLE>
      </HEAD>
      <BODY>
      <SCRIPT LANGUAGE="JavaScript"><!--
      var _info = navigator.userAgent;
      var _ns = false;
      var _ie = (_info.indexOf("MSIE") > 0
           && _info.indexOf("Win") > 0
           && _info.indexOf("Windows 3.1") < 0);
      //--></SCRIPT>
      <COMMENT>
      <SCRIPT LANGUAGE="JavaScript1.1"><!--
          var _ns = (navigator.appName.indexOf("Netscape") >= 0
                    && ((_info.indexOf("Win") > 0
      && _info.indexOf("Win16") < 0
      && java.lang.System.getProperty("os.version").indexOf("3.5") < 0)
      || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) ));
      //--></SCRIPT>
      </COMMENT>
      <SCRIPT LANGUAGE="JavaScript"><!--
      if (_ie == true) {
      document.writeln(" <OBJECT");
      document.writeln(" CLASSID=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"");
      document.writeln(" CODEBASE=\"http://java.sun.com/products/plugin/1.3.0_01/jinstall-1301-win32.cab#Version=1,3,0,1\"");
      document.writeln(" HEIGHT=400");
      document.writeln(" NAME=\"d\"");
      document.writeln(" WIDTH=600");
      document.writeln(" ID=\"hello\"");
      document.writeln(" >");
      document.writeln(" <NOEMBED><XMP>");
      }
      else if (_ns == true) {
      document.writeln(" <EMBED");
      document.writeln(" PLUGINSPAGE=\"http://java.sun.com/products/plugin/1.3.0_01/plugin-install.html\"");
      document.writeln(" TYPE=\"application/x-java-applet;jpi-version=1.3.0_01\"");
      document.writeln(" HEIGHT=400");
      document.writeln(" NAME=\"hello\"");
      document.writeln(" WIDTH=600");
      document.writeln(" CODE=\"HelloApplet.class\"");
      document.writeln(" ARCHIVE=\"HelloApplet.jar\"");
      document.writeln(" ><NOEMBED><XMP>");
      }
      //--></SCRIPT>
      <APPLET CODE="HelloApplet.class" WIDTH=600 HEIGHT=400 NAME="hello" ARCHIVE="HelloApplet.jar"></XMP>
      <PARAM NAME="CODE" VALUE="HelloApplet.class">
      <PARAM NAME="ARCHIVE" VALUE="HelloApplet.jar">
      </APPLET>
      </NOEMBED></EMBED></OBJECT>
      </BODY>
      </HTML>

      When presented with the dialog asking whether you trust the signer of the applet jar, click the View Certificate button. A view of the certificate never appears. The signed applet dialog window may be moved by dragging the title bar, but it doesn't repaint. The applet area within the HTML page does not repaint. IE must be terminated forcefully.

      ======================================================================

      Attachments

        Activity

          People

            djayaramsunw Devananda Jayaraman (Inactive)
            pallenba Peter Allenbach (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: