On Fri, 10 Jan 2025 12:37:42 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
> Noticed this when backporting > [JDK-8311546](https://bugs.openjdk.org/browse/JDK-8311546). The test is > actually broken, as it does not include CA cert in the certification path. So > it passes even without the fix, and thus the test does not actually test what > the fix is supposed to fix. > > The test is also quite hairy and can be drastically simplified. > > It looks to me the actual bug is in this line: > > > List<Certificate> list = List.of(targetCert); > > > I think it got wrongly rewritten here: > https://github.com/openjdk/jdk/commit/a2c0fa6f9ccefd3d1b088c51d0b8170cfb59a885#diff-518af459086b0cd1aef2498da82abf7da93391c030662e55312860ac9ce80542L55 > > > Additional testing: > - [x] Test now fails with > [JDK-8311546](https://bugs.openjdk.org/browse/JDK-8311546) fix reverted, > passes with it This pull request has now been integrated. Changeset: a6be9076 Author: Aleksey Shipilev <sh...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/a6be9076351b591cbc0860b1ba8f3c56319f4ffe Stats: 63 lines in 1 file changed: 1 ins; 44 del; 18 mod 8347424: Fix and rewrite sun/security/x509/DNSName/LeadingPeriod.java test Reviewed-by: mullan, bperez ------------- PR: https://git.openjdk.org/jdk/pull/23033