Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: components/cast_certificate/cast_cert_validator_unittest.cc

Issue 2093223002: Allow Cast certificates to have serial numbers greater than 20 bytes, as well as non-minimal INTEGE… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/cast_certificate/cast_cert_validator_unittest.cc
diff --git a/components/cast_certificate/cast_cert_validator_unittest.cc b/components/cast_certificate/cast_cert_validator_unittest.cc
index 37999427ebf0a4c8f82ec7e5817e7c4300f227f9..e363a1d47c859bbf0f6b1646689cb7ff6fabc6f0 100644
--- a/components/cast_certificate/cast_cert_validator_unittest.cc
+++ b/components/cast_certificate/cast_cert_validator_unittest.cc
@@ -279,6 +279,27 @@ TEST(VerifyCastDeviceCertTest, AudioRefDevTestChain3) {
"signeddata/AudioReferenceDevTest.pem");
}
+// Tests verifying a valid certificate chain of length 3. Note that the first
+// intermediate has a serial number that is 21 octets long, which violates RFC
+// 5280. However cast verification accepts this certificate for compatibility
+// reasons.
+//
+// 0: 8C579B806FFC8A9DFFFF F8:8F:CA:6B:E6:DA
+// 1: Sony so16vic CA
+// 2: Cast Audio Sony CA
+//
+// Chains to trust anchor:
+// Cast Root CA (not included)
+//
+// This device certificate has a policy that means it is valid only for audio
+// devices.
+TEST(VerifyCastDeviceCertTest, IntermediateSerialNumberTooLong) {
+ RunTest(RESULT_SUCCESS, "8C579B806FFC8A9DFFFF F8:8F:CA:6B:E6:DA",
+ CastDeviceCertPolicy::AUDIO_ONLY,
+ "certificates/intermediate_serialnumber_toolong.pem",
+ AprilFirst2016(), "");
+}
+
// ------------------------------------------------------
// Valid signature using 1024-bit RSA key
// ------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698