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

Hai-May Chao hchao at openjdk.org
Tue Mar 4 00:45:33 UTC 2025


The jarsigner -verify command currently performs verification by reading from JarFile to navigate the central directory (CEN) headers. It is now enhanced to include cross-validation of entries between JarFile (CEN-based) and JarInputStream (stream-based) representations of the JAR. It emits earnings when detecting discrepancies between a JAR file’s central directory and its local file entries.

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

Commit messages:
 - Test on large entry
 - Add cross checking in jarsigner instead of accessing ZIP internals
 - Revert changes to Resources.java
 - Revert changes to Main.java
 - Revert changes to Test.java
 - Revert changes to LowerCaseManifest.java
 - Revert changes to PreserveRawManifestEntryAndDigest.java
 - Remove subclass TrackPushbackInputStream.java
 - Revert changes to JavaUtilZipFileAccess.java
 - Revert changes to ZipInputStream.java
 - ... and 10 more: https://git.openjdk.org/jdk/compare/64bd8d25...d5fe503a

Changes: https://git.openjdk.org/jdk/pull/23532/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23532&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8339280
  Stats: 268 lines in 4 files changed: 268 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/23532.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23532/head:pull/23532

PR: https://git.openjdk.org/jdk/pull/23532


More information about the security-dev mailing list