mirror of
https://github.com/XTLS/REALITY.git
synced 2025-08-22 14:38:35 +00:00
crypto/tls: add missing RUnlock in ticketKeys
If GetConfigForClient returns a tls.Config that has SessionTicketsDisabled set, the TLS server handshake currently leaves the Config's internal RWMutex read locked after calculating the ticketKeys to use for the handshake. Change-Id: I07e450a0d2edda9e80f51fc2c20af633aa271684 GitHub-Last-Rev: 693d7ac GitHub-Pull-Request: #68607 Reviewed-on: https://go-review.googlesource.com/c/go/+/601335 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Sean Liao <sean@liao.dev> Reviewed-by: Roland Shoemaker <roland@golang.org>
This commit is contained in:
parent
fd9059aef1
commit
989cf77b4e
@ -1039,6 +1039,7 @@ func (c *Config) ticketKeys(configForClient *Config) []ticketKey {
|
|||||||
if configForClient != nil {
|
if configForClient != nil {
|
||||||
configForClient.mutex.RLock()
|
configForClient.mutex.RLock()
|
||||||
if configForClient.SessionTicketsDisabled {
|
if configForClient.SessionTicketsDisabled {
|
||||||
|
configForClient.mutex.RUnlock()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
configForClient.initLegacySessionTicketKeyRLocked()
|
configForClient.initLegacySessionTicketKeyRLocked()
|
||||||
|
Loading…
Reference in New Issue
Block a user