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

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: Fixed nit 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
« no previous file with comments | « extensions/common/cast/cast_cert_validator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5665b0ff88ebc3a6fc36e301b82eb7fb27507cd9..b01a30054dc6ca5091f5c58f591565fd6339e694 100644
--- a/extensions/common/cast/cast_cert_validator.cc
+++ b/extensions/common/cast/cast_cert_validator.cc
@@ -292,6 +292,11 @@ std::unique_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
« no previous file with comments | « 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