RFR: 8327182: Move serverAlias into the loop [v2]
Weijun Wang
weijun at openjdk.org
Tue Mar 19 11:40:24 UTC 2024
On Mon, 4 Mar 2024 09:14:23 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> At the beginning of a iteration, `km.chooseServerAlias` or `km.chooseEngineServerAlias` tries to find an alias. Then, `serverAlias` should be `null` or an existing alias in the key manager.
>> The `serverAlias` assigned by the last iteration should not used by the current iteration.
>> So, I don't see a bug at the moment.
>
> I know what I missed now. The interface `SSLTransport` only has two implementations `SSLSocketImpl` and `SSLEngineImpl`, so the `serverAlias` is always set at the beginning of the loop. Thanks for your kindly explanation.
A little late. But this means `SSLTransport` can be defined as `sealed` and the assignment here can be modified into a `switch` expression without `default`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18100#discussion_r1530199807
More information about the security-dev
mailing list