runner: Don't parse zero-length OCSP responses in tests

If we had accidentally added extra zero-length OCSP responses (see
https://github.com/openssl/openssl/issues/28989), we would have caught
it when talking to ourselves, but the runner tests would not have
noticed. Make the runner parser strict so it too would have flagged
this.

Change-Id: I48808507604fb33873c37faf98c10b07c5186ac1
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/83207
Commit-Queue: Lily Chen <chlily@google.com>
Reviewed-by: Lily Chen <chlily@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
diff --git a/ssl/test/runner/handshake_messages.go b/ssl/test/runner/handshake_messages.go
index 7eecb06..d9221e8 100644
--- a/ssl/test/runner/handshake_messages.go
+++ b/ssl/test/runner/handshake_messages.go
@@ -2228,6 +2228,7 @@
 					if !body.ReadUint8(&statusType) ||
 						statusType != statusTypeOCSP ||
 						!readUint24LengthPrefixedBytes(&body, &cert.ocspResponse) ||
+						len(cert.ocspResponse) == 0 ||
 						len(body) != 0 {
 						return false
 					}
@@ -2377,6 +2378,7 @@
 	if !reader.ReadUint8(&m.statusType) ||
 		m.statusType != statusTypeOCSP ||
 		!readUint24LengthPrefixedBytes(&reader, &m.response) ||
+		len(m.response) == 0 ||
 		len(reader) != 0 {
 		return false
 	}