Add a test for out-of-order ChangeCipherSpec in DTLS.
We were missing this case. It is possible to receive an early unencrypted
ChangeCipherSpec alert in DTLS because they aren't ordered relative to the
handshake. Test this case. (ChangeCipherSpec in DTLS is kind of pointless.)
Change-Id: I84268bc1821734f606fb20bfbeda91abf372f32c
Reviewed-on: https://boringssl-review.googlesource.com/8460
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/test/runner/common.go b/ssl/test/runner/common.go
index ae03850..2a5565b 100644
--- a/ssl/test/runner/common.go
+++ b/ssl/test/runner/common.go
@@ -493,6 +493,11 @@
// and 1.0.1 modes, respectively.
EarlyChangeCipherSpec int
+ // StrayChangeCipherSpec causes every pre-ChangeCipherSpec handshake
+ // message in DTLS to be prefaced by stray ChangeCipherSpec record. This
+ // may be used to test DTLS's handling of reordered ChangeCipherSpec.
+ StrayChangeCipherSpec bool
+
// FragmentAcrossChangeCipherSpec causes the implementation to fragment
// the Finished (or NextProto) message around the ChangeCipherSpec
// messages.