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

Jarsigner removes user-defined sections from manifest file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • security-libs



      Name: yyT116575 Date: 08/28/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


      When using Jarsigner on a jar, user-defined sections within the manifest file
      seem to get stripped away, e.g. if the manifest file contains the following
      lines they are removed when run through Jarsigner:

        Name: GRADE-X
        Jar-Version: 2.01

      Example manifest files (before and after using Jarsigner) are shown below:

      Before...
       
        Manifest-Version: 1.0
        Specification-Title: "GRADE-X Resource"
        Specification-Vendor: "GenRad Ltd".
        Created-By: 1.3.0 (Sun Microsystems Inc.)
        Specification-Version: "0.1"
        Class-Path:

        Name: GRADE-X
        Jar-Version: 2.01

      And after using jarsigner....

        Manifest-Version: 1.0
        Specification-Title: "GRADE-X Resource"
        Specification-Vendor: "GenRad Ltd".
        Created-By: 1.3.0 (Sun Microsystems Inc.)
        Class-Path:
        Specification-Version: "0.1"

        Name: GxBaseRes_en.properties
        SHA1-Digest: x6avMXIhDIhnPqIGLADm87kSuf0=

        Name: GxBaseRes.properties
        SHA1-Digest: x6avMXIhDIhnPqIGLADm87kSuf0=

      As you can see quite clearly my user-defined lines have been removed by
      Jarsigner. Is there anyway to tell Jarsigner to preserve user-defined sections
      in a manifest file?

      Two jar files have been attached.
      (Review ID: 130818)
      ======================================================================

            smalkanisunw Seema Malkani (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: