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

JarSignatureTest.java - testAlgorithmAlignment_DSA,RSA,EC failed due to unequal digestAlgorithm

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • deploy

        JarSignatureTest.java has three test cases:
        1. testAlgorithmAlignment_DSA
        2. testAlgorithmAlignment_RSA
        3. testAlgorithmAlignment_EC

        which fails due to incorrect values of digestAlgorithm

        The value set is SHA-1, SHA-256, SHA-256 respectively while the jarSignature (js.getDigestAlgorithm().getName()) has different values (SHA, SHA256, SHA256). This is causing the assertEqual method to fail.

        Suggested fix:
        Change the value for checking by removing the '-'
         and in case of the default value - DSA set it to SHA instead of SHA1
         

              vrao Vivek Rao (Inactive)
              vrao Vivek Rao (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: