Regression test for CVE-2015-0291.
This is really just scar tissue with https://crbug.com/468889 being the real underlying problem. But the test is pretty easy. Change-Id: I5eca18fdcbde8665c0e6c3ac419a28152647d66f Reviewed-on: https://boringssl-review.googlesource.com/4052 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
b85a4c2923
commit
3c9746a6d7
@ -667,6 +667,10 @@ type ProtocolBugs struct {
|
||||
// NeverResumeOnRenego, if true, causes renegotiations to always be full
|
||||
// handshakes.
|
||||
NeverResumeOnRenego bool
|
||||
|
||||
// NoSignatureAlgorithmsOnRenego, if true, causes renegotiations to omit
|
||||
// the signature_algorithms extension.
|
||||
NoSignatureAlgorithmsOnRenego bool
|
||||
}
|
||||
|
||||
func (c *Config) serverInit() {
|
||||
|
@ -130,7 +130,7 @@ NextCipherSuite:
|
||||
return errors.New("tls: short read from Rand: " + err.Error())
|
||||
}
|
||||
|
||||
if hello.vers >= VersionTLS12 && !c.config.Bugs.NoSignatureAndHashes {
|
||||
if hello.vers >= VersionTLS12 && !c.config.Bugs.NoSignatureAndHashes && (c.cipherSuite == 0 || !c.config.Bugs.NoSignatureAlgorithmsOnRenego) {
|
||||
hello.signatureAndHashes = c.config.signatureAndHashesForClient()
|
||||
}
|
||||
|
||||
|
@ -2682,6 +2682,19 @@ func addRenegotiationTests() {
|
||||
},
|
||||
flags: []string{"-allow-unsafe-legacy-renegotiation"},
|
||||
})
|
||||
// Regression test for CVE-2015-0291.
|
||||
testCases = append(testCases, testCase{
|
||||
testType: serverTest,
|
||||
name: "Renegotiate-Server-NoSignatureAlgorithms",
|
||||
config: Config{
|
||||
Bugs: ProtocolBugs{
|
||||
NeverResumeOnRenego: true,
|
||||
NoSignatureAlgorithmsOnRenego: true,
|
||||
},
|
||||
},
|
||||
flags: []string{"-renegotiate"},
|
||||
shimWritesFirst: true,
|
||||
})
|
||||
// TODO(agl): test the renegotiation info SCSV.
|
||||
testCases = append(testCases, testCase{
|
||||
name: "Renegotiate-Client",
|
||||
|
Loading…
Reference in New Issue
Block a user