JDK-8342002 : sun/security/tools/keytool/GenKeyPairSigner.java failed due to missing certificate output
  • Type: Bug
  • Component: security-libs
  • Affected Version: 24
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2024-10-12
  • Updated: 2024-10-21
  • Resolved: 2024-10-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24 b20Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8342003 :  
Description
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.
Comments
Changeset: 9e262df8 Branch: master Author: Weijun Wang <weijun@openjdk.org> Date: 2024-10-14 16:00:04 +0000 URL: https://git.openjdk.org/jdk/commit/9e262df813874043f72b60695a88c28fc7d5cccb
14-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21499 Date: 2024-10-14 13:53:10 +0000
14-10-2024

Bumping priority from P3 -> P2 since this might a regression.
12-10-2024

[~weijun] - Please investigate this failure. Your fix for JDK-8340327 was included in the Tier2 job set where this failure first occurred.
12-10-2024

This bug might be a regression caused by: JDK-8340327 A common framework to support public key algorithms with standard parameter sets
12-10-2024

> Maybe fails after JDK-8340327 Could be. The fix for JDK-8340327 was included in the Tier2 job set.
12-10-2024

Maybe fails after JDK-8340327
12-10-2024