RFR: 8294985: SSLEngine throws IAE during parsing of X500Principal [v6]

Sean Mullan mullan at openjdk.org
Mon May 15 19:40:46 UTC 2023


On Mon, 15 May 2023 19:17:18 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> Yes, let's wait for @XueleiFan
>
> It is not easy to understand the final behavior if throwing SSLException here.  I would like to call `TransportContext.fatal()` directly to make the behavior more accuracy, by using Alert.DECODE_ERROR.

You will need to pass in `TransportContext` as a parameter if you do that, unless you go back changing the callers of `getAuthorities()` to catch `IllegalArgumentException`. I'm now thinking it is better for the callers of `getAuthorities()` to catch `IllegalArgumentException` and then call `fatal`.

One other minor comment:

- I would remove the word "successfully" as this is a failure case so it is implied.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13466#discussion_r1194286609


More information about the security-dev mailing list