My Java application uses Oracles JPackage to build an installation, I then use ksigncmd to digitally sign the installer using a certificate provided by comodo
e.g.
c:\Code\jthink\SongKong>"C:\Program Files\Eclipse Adoptium\jdk-20.0.2.9-hotspot\bin\jpackage" --add-launcher SongKongDebug=songkongdebug.properties --add-launcher SongKongRemote=songkongremote.properties @jpackage.txt
c:\Code\jthink\SongKong>attrib -r SongKong-10.0.exe
c:\Code\jthink\SongKong>C:\Apps\Code\kSign\ksigncmd /d "SongKong Installer" /du "http://jthink.net/songkong" /f c:\code\signing\comodo.pfx /p password SongKong-10.0.exe
Been working for many years.
To resolve an issue with JPackage I would like to use the Java 21 version of JPackage but when I do that signing now fails with An unknown error has occured. Please contact your vendor for assistance
e.g.
c:\Code\jthink\SongKong>"C:\Program Files\Eclipse Adoptium\jdk-21.0.1.12-hotspot\bin\jpackage" --add-launcher SongKongDebug=songkongdebug.properties --add-launcher SongKongRemote=songkongremote.properties @jpackage.txt
c:\Code\jthink\SongKong>attrib -r SongKong-10.0.exe
c:\Code\jthink\SongKong>C:\Apps\Code\kSign\ksigncmd /d "SongKong Installer" /du "http://jthink.net/songkong" /f c:\code\signing\comodo.pfx /p password SongKong-10.0.exe
An unknown error has occured. Please contact your vendor for assistance
What could be the change in the Java 21 build that prevents ksigncmd working ?
Most likely that certificate used by you is not compatible with Java21
Solution: Please get new certificate from vendor
Rootcause: whenever we upgrade to Java version, we need to recreate keystore files because each java version will remove some service providers and add/remove algorithms/certificates supported
Reference URLs:
https://www.oracle.com/java/technologies/javase/21-relnote-issues.html#JDK-8295894 has list of Security Algorithms supported
https://docs.oracle.com/en/java/javase/21/security/oracle-providers.html#GUID-F41EE1C9-DD6A-4BAB-8979-EB7654094029 has Security Certificate Provider details
https://docs.oracle.com/en/java/javase/21/migrate/removed-tools-and-components.html#GUID-D7936F0D-08A9-411E-AD2F-E14A38DA56A7 has information on list of Tools removed from Java21 .
Please refer Removed Features and Options section on https://www.oracle.com/java/technologies/javase/21-relnote-issues.html

If comodo certificate uses any of these features , Java21 blocks it and signing will not happen.