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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_COMMON_CAST_CAST_CERT_VALIDATOR_H_ 5 #ifndef EXTENSIONS_COMMON_CAST_CAST_CERT_VALIDATOR_H_
6 #define EXTENSIONS_COMMON_CAST_CAST_CERT_VALIDATOR_H_ 6 #define EXTENSIONS_COMMON_CAST_CAST_CERT_VALIDATOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 CastDeviceCertPolicy* policy) WARN_UNUSED_RESULT; 79 CastDeviceCertPolicy* policy) WARN_UNUSED_RESULT;
80 80
81 // Exposed only for unit-tests, not for use in production code. 81 // Exposed only for unit-tests, not for use in production code.
82 // Production code would get a context from VerifyDeviceCert(). 82 // Production code would get a context from VerifyDeviceCert().
83 // 83 //
84 // Constructs a VerificationContext that uses the provided public key. 84 // Constructs a VerificationContext that uses the provided public key.
85 // The common name will be hardcoded to some test value. 85 // The common name will be hardcoded to some test value.
86 scoped_ptr<CertVerificationContext> CertVerificationContextImplForTest( 86 scoped_ptr<CertVerificationContext> CertVerificationContextImplForTest(
87 const base::StringPiece& spki); 87 const base::StringPiece& spki);
88 88
89 // Exposed only for testing, not for use in production code.
90 //
91 // Injects trusted root certificates into the CastTrustStore.
92 // Warning: Using this function concurrently with VerifyDeviceCert()
93 // is not thread safe.
94 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
95 size_t length) WARN_UNUSED_RESULT;
89 96
90 } // namespace cast_crypto 97 } // namespace cast_crypto
91 } // namespace api 98 } // namespace api
92 } // namespace extensions 99 } // namespace extensions
93 100
94 #endif // EXTENSIONS_COMMON_CAST_CAST_CERT_VALIDATOR_H_ 101 #endif // EXTENSIONS_COMMON_CAST_CAST_CERT_VALIDATOR_H_
OLDNEW
« 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