On Mon, 14 Sep 2026 12:30:13 GMT, Weijun Wang <[email protected]> wrote:

>> Mark Powers has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - comment from Weijun to eliminate huge indentation from if statement
>>  - comment from Weijun about probe patterns
>
> src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java line 2577:
> 
>> 2575:         boolean result = false;
>> 2576: 
>> 2577:         if (finalBytes.length == Long.BYTES || finalBytes.length == 
>> Short.BYTES) {
> 
> Not sure if we need to restrict to 2 or 8 bytes. Technically, someone can 
> rewrite the same super-simple 18-byte PKCS12 to indefinite length, which 
> means 80 as length and extra 00 00 at the end. This results in 
> `finalBytes.length` being 4. You can actually make this a test case.

Good point. I added a test case for this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32357#discussion_r4028128363

Reply via email to