On Tue, 28 Feb 2023 19:09:00 GMT, Eirik Bjorsnos <d...@openjdk.org> wrote:
> The `-altsigner` and `-altsignerpath` options in JarSigner with the > underlying `ContentSigner` mechanism were deprected in Java 9, for removal in > Java 16. See [JDK-8076535](https://bugs.openjdk.org/browse/JDK-8076535), > [JDK-8242260](https://bugs.openjdk.org/browse/JDK-8242260). > > This PR suggests it's time to remove this code: > > - The package `com/sun/jarsigner` is removed. This contained the > `ContentSigner` and `ContentSignerParameters` along with a > `package-info.java` file. > - `JarSigner.java` is updated to remove processing of the `-altsigner` and > `-altsignerpath` options and the loading and processing of the custom > `ContentSigner`. > - Similarly `c.s.s.t.jarsigner.Main` is updated to remove processing and > mentioning of `-altsigner` and `-altsignerpath` options. > - Mentions of the options in Resource files in the same directory is removed > - The `jarsigner.1` man page is updated to remove the section on the > deprecated options > - The `Spec` and `Options` tests are update to remove usage of the > `-altsigner` and `-altsignerpath` options. Suggested release note: Release Note: Removal of the -altsigner mechanism in jarsigner The `jarsigner` options `-altsigner` and `-altsignerpath` have been removed, along with the underlying `ContentSigner` API in the package `com.sun.jarsigner` . The mechanism was deprecated in JDK 9 and marked for removal in JDK 15. Suggested CSR: ### Compatibility Kind: source, binary, behavioral ### Compatibility Risk minimal ### Compatibility Risk Description The APIs were deprecated in JDK 9 with no known existing use. The probability that they have been used after that time is low. ### Summary The `ContentSigner` API in `com.sun.jarsigner` and the accompanying `jarsigner` options `-altsigner` and `-altsignerpath` options have been deprecated for removal since JDK 15 and should be removed. ### Problem This extension mechanism was deprecated in JDK 9 since it was deemed too low-level and had no known use. Removing it will reduce maintainence costs for jarsigner. ### Solution Remove the terminally deprecated classes `com.sun.jarsigner.ContentSigner`, `com.sun.jarsigner.ContentSignerParameters`and the associated `package-info.java` file. Remove the `-altsigner` and `-altsignerpath` options from jarsigner tool. Remove any mention of these options from the jarsigner man page. ### Specification The classes `com.sun.jarsigner.ContentSigner` and `com.sun.jarsigner.ContentSignerParameters` are removed. Any class implementing these interfaces will fail to compile. `jarsigner --help` no longer list the -altsigner or -altsigner options. `jarsigner -altsigner` will fail with an 'illegal option' message: % jarsigner -altsigner Illegal option: -altsigner ------------- PR: https://git.openjdk.org/jdk/pull/12791