summaryrefslogtreecommitdiffstats
path: root/src/ssl/test/runner/dtls.go
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2015-09-25 00:37:00 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-25 00:37:00 +0000
commit00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872 (patch)
treedc62c249d595198e0d99e43890019d21e901fbec /src/ssl/test/runner/dtls.go
parent3781a60670f92c3c6fca860cb4589495cefa2e56 (diff)
parenta04d78d392463df4e69a64360c952ffa5abd22f7 (diff)
downloadexternal_boringssl-00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872.zip
external_boringssl-00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872.tar.gz
external_boringssl-00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872.tar.bz2
am a04d78d3: Revert "external/boringssl: sync with upstream."
* commit 'a04d78d392463df4e69a64360c952ffa5abd22f7': Revert "external/boringssl: sync with upstream."
Diffstat (limited to 'src/ssl/test/runner/dtls.go')
-rw-r--r--src/ssl/test/runner/dtls.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ssl/test/runner/dtls.go b/src/ssl/test/runner/dtls.go
index 5c59dea..50f7786 100644
--- a/src/ssl/test/runner/dtls.go
+++ b/src/ssl/test/runner/dtls.go
@@ -216,10 +216,13 @@ func (c *Conn) dtlsFlushHandshake() error {
// Pack handshake fragments into records.
var records [][]byte
for _, fragment := range fragments {
- if n := c.config.Bugs.SplitFragments; n > 0 {
- if len(fragment) > n {
- records = append(records, fragment[:n])
- records = append(records, fragment[n:])
+ if c.config.Bugs.SplitFragmentHeader {
+ records = append(records, fragment[:2])
+ records = append(records, fragment[2:])
+ } else if c.config.Bugs.SplitFragmentBody {
+ if len(fragment) > 12 {
+ records = append(records, fragment[:13])
+ records = append(records, fragment[13:])
} else {
records = append(records, fragment)
}
@@ -298,13 +301,13 @@ func (c *Conn) dtlsSealRecord(typ recordType, data []byte) (b *block, err error)
b.data[1] = byte(vers >> 8)
b.data[2] = byte(vers)
// DTLS records include an explicit sequence number.
- copy(b.data[3:11], c.out.outSeq[0:])
+ copy(b.data[3:11], c.out.seq[0:])
b.data[11] = byte(len(data) >> 8)
b.data[12] = byte(len(data))
if explicitIVLen > 0 {
explicitIV := b.data[recordHeaderLen : recordHeaderLen+explicitIVLen]
if explicitIVIsSeq {
- copy(explicitIV, c.out.outSeq[:])
+ copy(explicitIV, c.out.seq[:])
} else {
if _, err = io.ReadFull(c.config.rand(), explicitIV); err != nil {
return