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

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

Issue 2901103002: Fix closing namespace comments in //net. (Closed)
Patch Set: Rebase. Created 3 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
« no previous file with comments | « net/base/zap.cc ('k') | net/cert/cert_verify_proc_whitelist_unittest.cc » ('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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/cert_verify_proc_whitelist.h" 5 #include "net/cert/cert_verify_proc_whitelist.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 8
9 #include "net/base/lookup_string_in_fixed_set.h" 9 #include "net/base/lookup_string_in_fixed_set.h"
10 #include "net/cert/x509_certificate.h" 10 #include "net/cert/x509_certificate.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Comparator to compare a (SHA-256) HashValue with a uint8_t array containing 52 // Comparator to compare a (SHA-256) HashValue with a uint8_t array containing
53 // a raw SHA-256 hash. Return value follows memcmp semantics. 53 // a raw SHA-256 hash. Return value follows memcmp semantics.
54 int CompareHashValueToRawHash(const void* key, const void* element) { 54 int CompareHashValueToRawHash(const void* key, const void* element) {
55 const HashValue* search_key = reinterpret_cast<const HashValue*>(key); 55 const HashValue* search_key = reinterpret_cast<const HashValue*>(key);
56 return memcmp(search_key->data(), element, search_key->size()); 56 return memcmp(search_key->data(), element, search_key->size());
57 } 57 }
58 58
59 namespace wosign { 59 namespace wosign {
60 #include "net/data/ssl/wosign/wosign_domains-inc.cc" 60 #include "net/data/ssl/wosign/wosign_domains-inc.cc"
61 } // namespace 61 } // namespace wosign
62 62
63 } // namespace 63 } // namespace
64 64
65 bool IsNonWhitelistedCertificate(const X509Certificate& cert, 65 bool IsNonWhitelistedCertificate(const X509Certificate& cert,
66 const HashValueVector& public_key_hashes, 66 const HashValueVector& public_key_hashes,
67 base::StringPiece hostname) { 67 base::StringPiece hostname) {
68 for (const auto& hash : public_key_hashes) { 68 for (const auto& hash : public_key_hashes) {
69 if (hash.tag != HASH_VALUE_SHA256) 69 if (hash.tag != HASH_VALUE_SHA256)
70 continue; 70 continue;
71 71
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 domain_length) != kDafsaNotFound) { 120 domain_length) != kDafsaNotFound) {
121 return true; 121 return true;
122 } 122 }
123 } 123 }
124 124
125 return LookupStringInFixedSet(graph, graph_length, host.data(), end) != 125 return LookupStringInFixedSet(graph, graph_length, host.data(), end) !=
126 kDafsaNotFound; 126 kDafsaNotFound;
127 } 127 }
128 128
129 } // namespace net 129 } // namespace net
OLDNEW
« no previous file with comments | « net/base/zap.cc ('k') | net/cert/cert_verify_proc_whitelist_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698