RFR: 8298381: Improve handling of session tickets for multiple SSLContexts [v6]
Volker Simonis
simonis at openjdk.org
Mon Jan 9 16:15:00 UTC 2023
On Sat, 7 Jan 2023 08:21:38 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Updated copyright year to 2023
>
> src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java line 209:
>
>> 207: // Package-private, used only from SessionTicketExtension.KeyState::getCurrentKey.
>> 208: SessionTicketExtension.StatelessKey getKey(HandshakeContext hc) {
>> 209: SessionTicketExtension.StatelessKey ssk = keyHashMap.get(currentKeyID);
>
> is it safe to assume that the "currentKeyID" initialized/updated before on a different thread can be correctly read here?
Yes, because `currentKeyID` is updated in a synchronized section *after* the corresponding key was added to `keyHashMap`.
-------------
PR: https://git.openjdk.org/jdk/pull/11590
More information about the security-dev
mailing list