mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
crypto/tls: minor refactors for readability
Change-Id: I93e73f16474b4b31f7097af2f9479822dfc34c5c Reviewed-on: https://go-review.googlesource.com/20678 Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
parent
c278f9302e
commit
f0711b9192
5 changed files with 33 additions and 39 deletions
|
|
@ -552,14 +552,15 @@ func (hs *clientHandshakeState) processServerHello() (bool, error) {
|
|||
}
|
||||
c.scts = hs.serverHello.scts
|
||||
|
||||
if hs.serverResumedSession() {
|
||||
// Restore masterSecret and peerCerts from previous state
|
||||
hs.masterSecret = hs.session.masterSecret
|
||||
c.peerCertificates = hs.session.serverCertificates
|
||||
c.verifiedChains = hs.session.verifiedChains
|
||||
return true, nil
|
||||
if !hs.serverResumedSession() {
|
||||
return false, nil
|
||||
}
|
||||
return false, nil
|
||||
|
||||
// Restore masterSecret and peerCerts from previous state
|
||||
hs.masterSecret = hs.session.masterSecret
|
||||
c.peerCertificates = hs.session.serverCertificates
|
||||
c.verifiedChains = hs.session.verifiedChains
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (hs *clientHandshakeState) readFinished(out []byte) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue