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

sun/security/tools/jarsigner/warnings/NoTimestampTest.java test fails on ar_SA locale.

    Details

    • Subcomponent:
    • Resolved In Build:
      b20
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Test build: JDK 10 build 41
        Test env: Mac 10.13 with ar_SA locale.

        Error message:
        ----------System.err:(27/2508)*----------
         stdout: [jar signed.

        Warning:
        The signer's certificate is self-signed.
        No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2019-01-25).
        ];
         stderr: []
         exitValue = 0

        java.lang.RuntimeException: 'No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (\u0662\u0660\u0661\u0669-\u0660\u0661-\u0662\u0665).' missing from stdout/stderr

        at jdk.testlibrary.OutputAnalyzer.shouldContain(OutputAnalyzer.java:106)
        at Test.checkSigning(Test.java:176)
        at NoTimestampTest.start(NoTimestampTest.java:83)
        at NoTimestampTest.main(NoTimestampTest.java:44)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
        at java.base/java.lang.Thread.run(Thread.java:844)

        JavaTest Message: Test threw exception: java.lang.RuntimeException: 'No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (\u0662\u0660\u0661\u0669-\u0660\u0661-\u0662\u0665).' missing from stdout/stderr

        The root cause:
        L81: String warning = String.format(NO_TIMESTAMP_SIGNING_WARN_TEMPLATE,
                        expirationDate);
        L95: warning = String.format(NO_TIMESTAMP_VERIFYING_WARN_TEMPLATE, expirationDate);

        String.format(String format, Object... args) use system default locale which is ar_SA to format the string, so displaying the date using ARABIC-INDIC digits(\u0660~\u0669), not (0~9).
        Suggest to use another method: String.format​(Locale l, String format, Object... args) to specify locale to en_US.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dzhou Dora Zhou
                  Reporter:
                  dzhou Dora Zhou
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: