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

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

Issue 2784933002: Mitigate spoofing attempt using Latin letters. (Closed)
Patch Set: add similarity check unittests Created 3 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 (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 #ifndef NET_CERT_CERT_VERIFY_PROC_WHITELIST_H_ 5 #ifndef NET_CERT_CERT_VERIFY_PROC_WHITELIST_H_
6 #define NET_CERT_CERT_VERIFY_PROC_WHITELIST_H_ 6 #define NET_CERT_CERT_VERIFY_PROC_WHITELIST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 14 matching lines...) Expand all
25 // |cert| should be the verified certificate chain, with |public_key_hashes| 25 // |cert| should be the verified certificate chain, with |public_key_hashes|
26 // being the set of hashes of the SPKIs within the verified chain, and 26 // being the set of hashes of the SPKIs within the verified chain, and
27 // |hostname| as the GURL-normalized hostname. 27 // |hostname| as the GURL-normalized hostname.
28 bool NET_EXPORT_PRIVATE 28 bool NET_EXPORT_PRIVATE
29 IsNonWhitelistedCertificate(const X509Certificate& cert, 29 IsNonWhitelistedCertificate(const X509Certificate& cert,
30 const HashValueVector& public_key_hashes, 30 const HashValueVector& public_key_hashes,
31 base::StringPiece hostname); 31 base::StringPiece hostname);
32 32
33 // Returns true if |host| is in (or a subdomain of) a whitelisted host 33 // Returns true if |host| is in (or a subdomain of) a whitelisted host
34 // in |graph|, which is a DAFSA constructed by 34 // in |graph|, which is a DAFSA constructed by
35 // //net/tools/dafsa/make_dafsa.py that is |graph_length| bytes long. 35 // //base/dafsa/make_dafsa.py that is |graph_length| bytes long.
36 bool NET_EXPORT_PRIVATE IsWhitelistedHost(const unsigned char* graph, 36 bool NET_EXPORT_PRIVATE IsWhitelistedHost(const unsigned char* graph,
37 size_t graph_length, 37 size_t graph_length,
38 base::StringPiece host); 38 base::StringPiece host);
39 39
40 } // namespace net 40 } // namespace net
41 41
42 #endif // NET_CERT_CERT_VERIFY_PROC_WHITELIST_H_ 42 #endif // NET_CERT_CERT_VERIFY_PROC_WHITELIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698