mirror of
https://github.com/golang/go
synced 2024-11-21 11:24:39 -07: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.
This commit is contained in:
parent
9b4b4ae585
commit
693d7acf95
@ -962,6 +962,7 @@ func (c *Config) ticketKeys(configForClient *Config) []ticketKey {
|
||||
if configForClient != nil {
|
||||
configForClient.mutex.RLock()
|
||||
if configForClient.SessionTicketsDisabled {
|
||||
configForClient.mutex.RUnlock()
|
||||
return nil
|
||||
}
|
||||
configForClient.initLegacySessionTicketKeyRLocked()
|
||||
|
Loading…
Reference in New Issue
Block a user