On Mon, 2 Nov 2026 22:01:39 GMT, Artur Barashev <[email protected]> wrote:

>> Timofei Fedotov has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - Verify complete DTLS handshake fragment reassembly
>>  - Test inconsistent DTLS handshake fragment types
>
> src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java line 586:
> 
>> 584:     }
>> 585: 
>> 586:     private record HandshakeHoles(
> 
> I suggest to rename this class to `HandshakeReassemblyState`

Done.

> src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java line 751:
> 
>> 749:                     (hsf.fragmentLength != hsf.messageLength);
>> 750: 
>> 751:             HandshakeHoles message =
> 
> I suggest to rename `message` to `reassemblyState` here and in other places, 
> `message` looks rather confusing.

Done.

> test/jdk/javax/net/ssl/DTLS/InconsistentFragmentLength.java line 29:
> 
>> 27:  * @summary Reject inconsistent metadata in DTLS handshake fragments
>> 28:  * @library /test/lib
>> 29:  * @run main InconsistentFragmentLength
> 
> Nit: this line is not really needed, `main()` is called by default.

Done.

> test/jdk/javax/net/ssl/DTLS/InconsistentFragmentLength.java line 129:
> 
>> 127:         }
>> 128:         Asserts.assertEquals(engine.getHandshakeStatus(),
>> 129:                 SSLEngineResult.HandshakeStatus.NEED_WRAP);
> 
> Here is the sequence of events:
> 
> 1. `unwrap()` returns NEED_TASK.
> 2. The application executes `DelegatedTask.run()`, which catches and stores 
> an exception.
> 3. A later `wrap()` or `unwrap()` calls `checkTaskThrown()` and rethrows that 
> exception.
> 
> Thus, after running the tasks, call `wrap()` and assert successful 
> ClientHello output. This also exposes any saved exception.

Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33633#discussion_r4451198269
PR Review Comment: https://git.openjdk.org/jdk/pull/33633#discussion_r4451197930
PR Review Comment: https://git.openjdk.org/jdk/pull/33633#discussion_r4451198600
PR Review Comment: https://git.openjdk.org/jdk/pull/33633#discussion_r4451198893

Reply via email to