ADDITIONAL SYSTEM INFORMATION :
Windows 10 or 11
JDK 21.0.2 (Temurin)
A DESCRIPTION OF THE PROBLEM :
I have recently upgraded from Java 18 to Java 21, and noticed that there has been a change in jpackage which is causing signtool (the Microsoft code signing tool) to fail when signing the installer. Even though the installer .exe can be run on the system, the signtool command fails with:
SignTool Error: SignedCode::Sign returned error: 0x800700C1
This rather cryptic message refers to ERROR_BAD_EXE_FORMAT. Note that the same build run with Java 18 produces an .exe installer which does not have this problem.
If I compare the .exe produced by Java 21 with that produced by Java 18 with dumpfile and pestudio, I notice two differences:
1. There is a 'version' section containing application name and version information in the Java 18 installer which is no longer present
2. The linker version has changed from 1.27 to 1.37
REGRESSION : Last worked in version 18
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a Windows installer using jpackage from JDK 21
2. Attempt to sign the installer .exe using Windows signtool
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The .exe should be successfully code signed.
ACTUAL -
signtool returns the following error:
SignTool Error: SignedCode::Sign returned error: 0x800700C1
FREQUENCY : always
Windows 10 or 11
JDK 21.0.2 (Temurin)
A DESCRIPTION OF THE PROBLEM :
I have recently upgraded from Java 18 to Java 21, and noticed that there has been a change in jpackage which is causing signtool (the Microsoft code signing tool) to fail when signing the installer. Even though the installer .exe can be run on the system, the signtool command fails with:
SignTool Error: SignedCode::Sign returned error: 0x800700C1
This rather cryptic message refers to ERROR_BAD_EXE_FORMAT. Note that the same build run with Java 18 produces an .exe installer which does not have this problem.
If I compare the .exe produced by Java 21 with that produced by Java 18 with dumpfile and pestudio, I notice two differences:
1. There is a 'version' section containing application name and version information in the Java 18 installer which is no longer present
2. The linker version has changed from 1.27 to 1.37
REGRESSION : Last worked in version 18
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a Windows installer using jpackage from JDK 21
2. Attempt to sign the installer .exe using Windows signtool
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The .exe should be successfully code signed.
ACTUAL -
signtool returns the following error:
SignTool Error: SignedCode::Sign returned error: 0x800700C1
FREQUENCY : always
- duplicates
-
JDK-8334398 jpackage creates Windows installers that cannot be signed
-
- Closed
-
- links to
-
Commit(master) openjdk/jdk/267d69be
-
Review(master) openjdk/jdk/23732