mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
crypto/tls: extensions and Next Protocol Negotiation
Add support for TLS extensions in general and Next Protocol Negotiation in particular. R=rsc CC=golang-dev https://golang.org/cl/181045
This commit is contained in:
parent
7c9111434a
commit
9ebb59634e
9 changed files with 379 additions and 28 deletions
|
|
@ -184,7 +184,7 @@ func (h *clientHandshake) loop(writeChan chan<- interface{}, controlChan chan<-
|
|||
return
|
||||
}
|
||||
|
||||
controlChan <- ConnectionState{true, "TLS_RSA_WITH_RC4_128_SHA", 0}
|
||||
controlChan <- ConnectionState{HandshakeComplete: true, CipherSuite: "TLS_RSA_WITH_RC4_128_SHA"}
|
||||
|
||||
// This should just block forever.
|
||||
_ = h.readHandshakeMsg()
|
||||
|
|
@ -218,7 +218,7 @@ func (h *clientHandshake) error(e alertType) {
|
|||
for _ = range h.msgChan {
|
||||
}
|
||||
}()
|
||||
h.controlChan <- ConnectionState{false, "", e}
|
||||
h.controlChan <- ConnectionState{Error: e}
|
||||
close(h.controlChan)
|
||||
h.writeChan <- alert{alertLevelError, e}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue