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

Jarsigner does not support TSA with precision better than miliseconds

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.8.0_73"
      Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
      Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 10.0.10586]

      A DESCRIPTION OF THE PROBLEM :
      The problem is that the use of jarsigner on RFC 3161 compliant TSA server fails if the server is set to return time precise better than milliseconds. The Generalized Time reported from server throws "unsupported precision" exception despite it being set correctly, and the whole signing process fails.

      The problem probably lies in sun.security.util.DerInputBuffer while parsing the Generalized Time.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      jarsigner -keystore "my.key" -storepass XXX -keypass XXX -tsa http://tsa.cesnet.cz:3161/tsa my_library.jar myLabel

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Signed JAR library.
      ACTUAL -
      Throws exception.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      jarsigner: unable to sign jar: java.io.IOException: Parse Generalized time,
      unsupported precision for seconds value

      REPRODUCIBILITY :
      This bug can be reproduced always.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: