diff options
Diffstat (limited to 'ssl/test/runner/conn.go')
-rw-r--r-- | ssl/test/runner/conn.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ssl/test/runner/conn.go b/ssl/test/runner/conn.go index 5371a64..9f0c328 100644 --- a/ssl/test/runner/conn.go +++ b/ssl/test/runner/conn.go @@ -9,6 +9,7 @@ package main import ( "bytes" "crypto/cipher" + "crypto/ecdsa" "crypto/subtle" "crypto/x509" "errors" @@ -46,6 +47,9 @@ type Conn struct { clientProtocol string clientProtocolFallback bool + usedALPN bool + + channelID *ecdsa.PublicKey // input/output in, out halfConn // in.Mutex < out.Mutex @@ -657,7 +661,7 @@ func (c *Conn) readRecord(want recordType) error { return c.in.setErrorLocked(errors.New("tls: handshake or ChangeCipherSpec requested after handshake complete")) } case recordTypeApplicationData: - if !c.handshakeComplete { + if !c.handshakeComplete && !c.config.Bugs.ExpectFalseStart { c.sendAlert(alertInternalError) return c.in.setErrorLocked(errors.New("tls: application data record requested before handshake complete")) } @@ -937,6 +941,8 @@ func (c *Conn) readHandshake() (interface{}, error) { m = new(finishedMsg) case typeHelloVerifyRequest: m = new(helloVerifyRequestMsg) + case typeEncryptedExtensions: + m = new(encryptedExtensionsMsg) default: return nil, c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage)) } @@ -1100,10 +1106,12 @@ func (c *Conn) ConnectionState() ConnectionState { state.NegotiatedProtocol = c.clientProtocol state.DidResume = c.didResume state.NegotiatedProtocolIsMutual = !c.clientProtocolFallback + state.NegotiatedProtocolFromALPN = c.usedALPN state.CipherSuite = c.cipherSuite state.PeerCertificates = c.peerCertificates state.VerifiedChains = c.verifiedChains state.ServerName = c.serverName + state.ChannelID = c.channelID } return state |