| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |