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

Side by Side Diff: net/cert/ct_known_logs.cc

Issue 1440643002: Certificate Transparency: Per-profile CT verification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing iOS compilation Created 5 years 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
« no previous file with comments | « net/cert/ct_known_logs.h ('k') | net/cert/ct_log_verifier.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "net/cert/ct_known_logs.h" 5 #include "net/cert/ct_known_logs.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 10 matching lines...) Expand all
21 21
22 namespace { 22 namespace {
23 23
24 int log_ids_compare(const char* log_id, const char* lookup_id) { 24 int log_ids_compare(const char* log_id, const char* lookup_id) {
25 return strncmp(log_id, lookup_id, crypto::kSHA256Length) < 0; 25 return strncmp(log_id, lookup_id, crypto::kSHA256Length) < 0;
26 } 26 }
27 27
28 } // namespace 28 } // namespace
29 29
30 #if !defined(OS_NACL) 30 #if !defined(OS_NACL)
31 std::vector<scoped_refptr<CTLogVerifier>> CreateLogVerifiersForKnownLogs() { 31 std::vector<scoped_refptr<const CTLogVerifier>>
32 std::vector<scoped_refptr<CTLogVerifier>> verifiers; 32 CreateLogVerifiersForKnownLogs() {
33 std::vector<scoped_refptr<const CTLogVerifier>> verifiers;
33 for (size_t i = 0; i < arraysize(kCTLogList); ++i) { 34 for (size_t i = 0; i < arraysize(kCTLogList); ++i) {
34 const CTLogInfo& log(kCTLogList[i]); 35 const CTLogInfo& log(kCTLogList[i]);
35 base::StringPiece key(log.log_key, log.log_key_length); 36 base::StringPiece key(log.log_key, log.log_key_length);
36 37
37 verifiers.push_back(CTLogVerifier::Create(key, log.log_name, log.log_url)); 38 verifiers.push_back(CTLogVerifier::Create(key, log.log_name, log.log_url));
38 } 39 }
39 40
40 return verifiers; 41 return verifiers;
41 } 42 }
42 #endif 43 #endif
(...skipping 12 matching lines...) Expand all
55 return false; 56 return false;
56 } 57 }
57 58
58 return true; 59 return true;
59 } 60 }
60 61
61 } // namespace ct 62 } // namespace ct
62 63
63 } // namespace net 64 } // namespace net
64 65
OLDNEW
« no previous file with comments | « net/cert/ct_known_logs.h ('k') | net/cert/ct_log_verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698