Test record splitting at all ciphers.
We were missing AES256 and 3DES. Though this test dates to the old record-splitting code which was much scarier than the new one. Change-Id: Ia84a8c1a2bbd79fa70941f80cf6393013e4f13d5 Reviewed-on: https://boringssl-review.googlesource.com/17543 Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
parent
bf5f192310
commit
a1ce85696d
@ -3210,36 +3210,46 @@ func addCBCPaddingTests() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func addCBCSplittingTests() {
|
func addCBCSplittingTests() {
|
||||||
testCases = append(testCases, testCase{
|
var cbcCiphers = []struct {
|
||||||
name: "CBCRecordSplitting",
|
name string
|
||||||
config: Config{
|
cipher uint16
|
||||||
MaxVersion: VersionTLS10,
|
}{
|
||||||
MinVersion: VersionTLS10,
|
{"3DES", TLS_RSA_WITH_3DES_EDE_CBC_SHA},
|
||||||
CipherSuites: []uint16{TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA},
|
{"AES128", TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA},
|
||||||
},
|
{"AES256", TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA},
|
||||||
messageLen: -1, // read until EOF
|
}
|
||||||
resumeSession: true,
|
for _, t := range cbcCiphers {
|
||||||
flags: []string{
|
testCases = append(testCases, testCase{
|
||||||
"-async",
|
name: "CBCRecordSplitting-" + t.name,
|
||||||
"-write-different-record-sizes",
|
config: Config{
|
||||||
"-cbc-record-splitting",
|
MaxVersion: VersionTLS10,
|
||||||
},
|
MinVersion: VersionTLS10,
|
||||||
})
|
CipherSuites: []uint16{t.cipher},
|
||||||
testCases = append(testCases, testCase{
|
},
|
||||||
name: "CBCRecordSplittingPartialWrite",
|
messageLen: -1, // read until EOF
|
||||||
config: Config{
|
resumeSession: true,
|
||||||
MaxVersion: VersionTLS10,
|
flags: []string{
|
||||||
MinVersion: VersionTLS10,
|
"-async",
|
||||||
CipherSuites: []uint16{TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA},
|
"-write-different-record-sizes",
|
||||||
},
|
"-cbc-record-splitting",
|
||||||
messageLen: -1, // read until EOF
|
},
|
||||||
flags: []string{
|
})
|
||||||
"-async",
|
testCases = append(testCases, testCase{
|
||||||
"-write-different-record-sizes",
|
name: "CBCRecordSplittingPartialWrite-" + t.name,
|
||||||
"-cbc-record-splitting",
|
config: Config{
|
||||||
"-partial-write",
|
MaxVersion: VersionTLS10,
|
||||||
},
|
MinVersion: VersionTLS10,
|
||||||
})
|
CipherSuites: []uint16{t.cipher},
|
||||||
|
},
|
||||||
|
messageLen: -1, // read until EOF
|
||||||
|
flags: []string{
|
||||||
|
"-async",
|
||||||
|
"-write-different-record-sizes",
|
||||||
|
"-cbc-record-splitting",
|
||||||
|
"-partial-write",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func addClientAuthTests() {
|
func addClientAuthTests() {
|
||||||
|
Loading…
Reference in New Issue
Block a user