RFR: 8339280: jarsigner -verify performs cross-checking between CEN and LOC [v7]

Weijun Wang weijun at openjdk.org
Thu Mar 27 00:02:09 UTC 2025


On Wed, 19 Mar 2025 19:22:04 GMT, Hai-May Chao <hchao at openjdk.org> wrote:

>> src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java line 1147:
>> 
>>> 1145:             Manifest locManifest = jis.getManifest();
>>> 1146:             if (!compareManifest(cenManifest, locManifest)) {
>>> 1147:                 return;
>> 
>> Here and within `compareManifest`, there are multiple early returns. Have you considered avoiding early returns and accumulating more warnings instead?
>
> Good idea. Updated the code. Thanks.

Again, shall we return here? Do you want to skip other comparison when the manifests are not the same?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23532#discussion_r2015124600


More information about the security-dev mailing list