On Fri, 16 Jun 2023 14:24:17 GMT, Matthew Donovan <mdono...@openjdk.org> wrote:
>> I had a search of the value assignment of handshakeSession. Here is one >> example of the calling stack: >> SSLEngineImpl.DelegatedTask.run()->TransportContext.dispatch()->SSLHandshake().consume()->HandshakeConsumer.consume()->SSLExtensions.product()->ServerHello.produce()->shc.handshakeSession >> = session >> >> The engineLock was placed on SSLEngineImpl.DelegatedTask.run() and released >> after complete the job, which means the value assignment of handshakeSession >> is synchronized. >> >> The locks in SSLEngineImpl and SSLSocketImpl are used for operations >> synchronization so that other classes may not need additional locks in most >> cases. > > I see what you're saying with respect to SSLEngineImpl. It looks like all of > the public methods are synchronized with `engineLock` so I shouldn't have > made any changes there. I will revert them. > > Are you ok with the changes in SSLSocketImpl? I may update both SSLSocketImpl and SSLEngineImpl, as SSLSocketImpl uses the locks similar to SSLEngineImpl. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13742#discussion_r1232331470