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

Side by Side Diff: extensions/common/cast/cast_cert_validator_test_helpers.h

Issue 1924323002: Move Cast certificate verification code from extensions to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplified OWNERS files Created 4 years, 7 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef EXTENSIONS_COMMON_CAST_CAST_CERT_VALIDATOR_TEST_HELPERS_H_
6 #define EXTENSIONS_COMMON_CAST_CAST_CERT_VALIDATOR_TEST_HELPERS_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/strings/string_piece.h"
12
13 namespace cast_test_helpers {
14
15 // Reads a PEM file containing certificates to a vector of their DER data.
16 // |file_name| should be relative to //src/extensions/test/data/
17 std::vector<std::string> ReadCertificateChainFromFile(
18 const base::StringPiece& file_name);
19
20 // Helper structure that describes a message and its various signatures.
21 struct SignatureTestData {
22 std::string message;
23
24 // RSASSA PKCS#1 v1.5 with SHA1.
25 std::string signature_sha1;
26
27 // RSASSA PKCS#1 v1.5 with SHA256.
28 std::string signature_sha256;
29 };
30
31 // Reads a PEM file that contains "MESSAGE", "SIGNATURE SHA1" and
32 // "SIGNATURE SHA256" blocks.
33 // |file_name| should be relative to //src/extensions/test/data/
34 SignatureTestData ReadSignatureTestData(const base::StringPiece& file_name);
35
36 } // namespace cast_test_helpers
37
38 #endif // EXTENSIONS_COMMON_CAST_CAST_CERT_VALIDATOR_TEST_HELPERS_H_
OLDNEW
« no previous file with comments | « extensions/common/cast/cast_cert_validator.cc ('k') | extensions/common/cast/cast_cert_validator_test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698