Add a TLS 1.3 version of UnsupportedCurve.
This is basically the same as BadECDHECurve-TLS13. That the client picks a share first but the server picks the curve type means there's less redundancy to deal with. Change-Id: Icd9a4ecefe8e0dfaeb8fd0b062ca28561b05df98 Reviewed-on: https://boringssl-review.googlesource.com/8817 Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
942f4ed64e
commit
4f9215734c
@ -6377,7 +6377,6 @@ func addCurveTests() {
|
|||||||
testCases = append(testCases, testCase{
|
testCases = append(testCases, testCase{
|
||||||
name: "UnsupportedCurve",
|
name: "UnsupportedCurve",
|
||||||
config: Config{
|
config: Config{
|
||||||
// TODO(davidben): Add a TLS 1.3 version of this test.
|
|
||||||
MaxVersion: VersionTLS12,
|
MaxVersion: VersionTLS12,
|
||||||
CipherSuites: []uint16{TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
|
CipherSuites: []uint16{TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
|
||||||
CurvePreferences: []CurveID{CurveP256},
|
CurvePreferences: []CurveID{CurveP256},
|
||||||
@ -6390,6 +6389,23 @@ func addCurveTests() {
|
|||||||
expectedError: ":WRONG_CURVE:",
|
expectedError: ":WRONG_CURVE:",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
testCases = append(testCases, testCase{
|
||||||
|
// TODO(davidben): Add a TLS 1.3 version where
|
||||||
|
// HelloRetryRequest requests an unsupported curve.
|
||||||
|
name: "UnsupportedCurve-ServerHello-TLS13",
|
||||||
|
config: Config{
|
||||||
|
MaxVersion: VersionTLS12,
|
||||||
|
CipherSuites: []uint16{TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
|
||||||
|
CurvePreferences: []CurveID{CurveP384},
|
||||||
|
Bugs: ProtocolBugs{
|
||||||
|
SendCurve: CurveP256,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
flags: []string{"-p384-only"},
|
||||||
|
shouldFail: true,
|
||||||
|
expectedError: ":WRONG_CURVE:",
|
||||||
|
})
|
||||||
|
|
||||||
// Test invalid curve points.
|
// Test invalid curve points.
|
||||||
testCases = append(testCases, testCase{
|
testCases = append(testCases, testCase{
|
||||||
name: "InvalidECDHPoint-Client",
|
name: "InvalidECDHPoint-Client",
|
||||||
|
Loading…
Reference in New Issue
Block a user