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

sun/security/tools/keytool/GenKeyPairSigner.java failed due to missing certificate output

XMLWordPrintable

    • b20
    • generic
    • generic

      The following test failed in the JDK24 CI:

      sun/security/tools/keytool/GenKeyPairSigner.java

      Here's a snippet from the linux-aarch64 log file:

      #section:main
      ----------messages:(8/316)----------
      command: main GenKeyPairSigner
      reason: Assumed action based on file name: run main GenKeyPairSigner
      started: Sat Oct 12 00:52:28 UTC 2024
      Mode: agentvm
      Agent id: 38
      Additional exports to unnamed modules from @modules: java.base/sun.security.util
      finished: Sat Oct 12 00:52:29 UTC 2024
      elapsed time (seconds): 1.524
      ----------configuration:(15/1916)----------

      <snip>

      ----------System.out:(21/1623)----------
      Testing the signer alias that is stored in the PKCS12 keystore
      Generating a root cert with SubjectKeyIdentifier extension
      Command line: [/opt/mach5/mesos/work_dir/jib-master/install/jdk-24+20-2269/linux-aarch64.jdk/jdk-24/bin/keytool -J-Duser.language=en -J-Duser.country=US -keystore ks -storepass changeit -genkeypair -keyalg EdDSA -alias ca -dname CN=CA -ext bc:c -ext 2.5.29.14=04:14:00:01:02:03:04:05:06:07:08:09:10:11:12:13:14:15:16:17:18:19]
      [2024-10-12T00:52:28.218162559Z] Gathering output for process 755501
      [2024-10-12T00:52:28.236387349Z] Waiting for completion for process 755501
      [2024-10-12T00:52:28.979589328Z] Waiting for completion finished for process 755501
      Output and diagnostic info for process 755501 was saved into 'pid-755501-output.log'
      Generating 255 bit Ed25519 key pair and self-signed certificate (Ed25519) with a validity of 90 days
      for: CN=CA

      Exit value: 0
      Generating an XDH cert with -signer option
      Command line: [/opt/mach5/mesos/work_dir/jib-master/install/jdk-24+20-2269/linux-aarch64.jdk/jdk-24/bin/keytool -J-Duser.language=en -J-Duser.country=US -keystore ks -storepass changeit -genkeypair -keyalg XDH -alias e1 -dname CN=E1 -signer ca]
      [2024-10-12T00:52:28.984067835Z] Gathering output for process 755612
      [2024-10-12T00:52:28.984806920Z] Waiting for completion for process 755612
      [2024-10-12T00:52:29.659302763Z] Waiting for completion finished for process 755612
      Output and diagnostic info for process 755612 was saved into 'pid-755612-output.log'
      Generating 255 bit X25519 key pair and a certificate (Ed25519) issued by <ca> with a validity of 90 days
      for: CN=E1

      Exit value: 0
      ----------System.err:(18/939)----------
       stdout: [];
       stderr: [Generating 255 bit X25519 key pair and a certificate (Ed25519) issued by <ca> with a validity of 90 days
      for: CN=E1
      ]
       exitValue = 0

      java.lang.RuntimeException: 'Generating 255 bit XDH key pair and a certificate (Ed25519) issued by <ca> with a validity of 90 days' missing from stdout/stderr
      at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:253)
      at GenKeyPairSigner.testSignerPKCS12(GenKeyPairSigner.java:87)
      at GenKeyPairSigner.main(GenKeyPairSigner.java:60)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:573)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.base/java.lang.Thread.run(Thread.java:1576)

      JavaTest Message: Test threw exception: java.lang.RuntimeException
      JavaTest Message: shutting down test

      result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'Generating 255 bit XDH key pair and a certificate (Ed25519) issued by <ca> with a validity of 90 days' missing from stdout/stderr

      I don't know if the expected certificate is expired or not.
      This test failed on all platforms.

        There are no Sub-Tasks for this issue.

            weijun Weijun Wang
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: