On Thu, 3 Dec 2026 03:01:46 GMT, xiaotaonan <[email protected]> wrote:
>> `AuthorizationData.writeAuth()` writes entries one by one but does not write >> the entry count before them. On the read side, >> `CCacheInputStream.readAuth()` always reads the count first. >> >> This mismatch does not affect JDK's normal `kinit` command (which never sets >> auth data), but it causes incorrect ccache content when a `Credentials` >> object with non-empty auth data is written. >> >> This fix writes `entry.length` before the loop in `writeAuth()`. >> >> Testing: >> - Added a regression test that constructs `AuthorizationData` with multiple >> entries, writes it to an in-memory ccache, reads it back, and verifies the >> entry count and types match. >> - The test uses internal classes (`sun.security.krb5.internal.*`, >> `sun.security.krb5.internal.ccache.*`) via `@modules`. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > xiaotaonan has updated the pull request incrementally with two additional > commits since the last revision: > > - fix: Modify according to the review comments. > - fix: Modify according to the review comments. Please, run your test before posting it here. ------------- PR Comment: https://git.openjdk.org/jdk/pull/34152#issuecomment-7366453576
