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

Unified Diff: extensions/common/cast/cast_cert_validator.cc

Issue 1888913005: Add a hook to inject trusted Cast roots for testing purposes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added note to comment Created 4 years, 8 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: extensions/common/cast/cast_cert_validator.cc
diff --git a/extensions/common/cast/cast_cert_validator.cc b/extensions/common/cast/cast_cert_validator.cc
index f80b1063d132cecaa7cbd1f2dc177230e5d6f621..2b7add252f035700d840691f9cdfcc9400aeac2c 100644
--- a/extensions/common/cast/cast_cert_validator.cc
+++ b/extensions/common/cast/cast_cert_validator.cc
@@ -289,6 +289,11 @@ scoped_ptr<CertVerificationContext> CertVerificationContextImplForTest(
new CertVerificationContextImpl(net::der::Input(spki), "CommonName"));
}
+bool AddTrustAnchorForTest(const uint8_t* data, size_t length) {
+ return CastTrustStore::Get().AddTrustedCertificateWithoutCopying(data,
+ length);
+}
+
} // namespace cast_crypto
} // namespace api
} // namespace extensions
« extensions/common/cast/cast_cert_validator.h ('K') | « extensions/common/cast/cast_cert_validator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698