summaryrefslogtreecommitdiff
path: root/ssl/test/runner/conn.go
diff options
context:
space:
mode:
authorPrimiano Tucci <primiano@google.com>2014-09-30 14:46:28 +0100
committerPrimiano Tucci <primiano@google.com>2014-09-30 14:46:28 +0100
commit7c4e52cd7aebb9f2fa64355c58bc75509685da94 (patch)
treebbdd45cda3f7f15eae3f9dfa9ac4d6a604d82479 /ssl/test/runner/conn.go
parent208436baefdf6180355219406c666c259c7fc450 (diff)
parent885164b8d921ef7dba08b9e5ae031bf7350bf4ff (diff)
downloadsrc-7c4e52cd7aebb9f2fa64355c58bc75509685da94.tar.gz
This commit was generated by merge_to_master.py. Change-Id: I9b1c013632df72dcd4e450d6a3b7749444191f77
Diffstat (limited to 'ssl/test/runner/conn.go')
-rw-r--r--ssl/test/runner/conn.go10
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