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

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

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: Renamed function 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.h
diff --git a/extensions/common/cast/cast_cert_validator.h b/extensions/common/cast/cast_cert_validator.h
index c435ebb8776f312edfb7c6bee440f028175c6d4f..2b0efb936b482f00750d615ce9c9e0aa5f11f4d7 100644
--- a/extensions/common/cast/cast_cert_validator.h
+++ b/extensions/common/cast/cast_cert_validator.h
@@ -86,6 +86,13 @@ bool VerifyDeviceCert(const std::vector<std::string>& certs,
scoped_ptr<CertVerificationContext> CertVerificationContextImplForTest(
const base::StringPiece& spki);
+// Exposed only for testing, not for use in production code.
+//
+// Injects trusted root certificates into the CastTrustStore.
+// Warning: Using this function concurrently with VerifyDeviceCert()
+// is not thread safe.
+bool AddTrustAnchorForTest(const uint8_t* data,
eroman 2016/04/22 05:58:54 Andrei suggested the name "AddDevTrustAnchorsForTe
ryanchung 2016/04/22 19:03:49 We've decided to not bundle the test anchors for n
+ size_t length) WARN_UNUSED_RESULT;
} // namespace cast_crypto
} // namespace api
« no previous file with comments | « no previous file | extensions/common/cast/cast_cert_validator.cc » ('j') | extensions/common/cast/cast_cert_validator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698