RFR: 8300259: Add test coverage for processing of pending block files in signed JARs

Eirik Bjorsnos duke at openjdk.org
Tue Jan 17 18:07:49 UTC 2023


This PR adds test coverage for pending block files in signed JAR files

A signed JAR has pending block files if the block file [RSA, DSA, EC] comes before the corresponding signature file [SF] in the JAR. 

JarVerifier.processEntry supports processing of such pending block files, but this code path does not seem to be exercised by current test.

The new test PendingBlocksJar checks that signed JARs  with pending blocks are processed correctly, both for the valid and invalid cases.

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

Commit messages:
 - Create JAR files in the current directory and let jtreg handle any deletion or retention of the files
 - Style: Add separating whitespace between keywords (such as try,for) and a left parenthesis
 - Use the JarSigner.Builder constructor which takes PrivateKeyEntry
 - Adds test coverage for pending block files in JarVerifier.processEntry

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

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



More information about the security-dev mailing list