OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_PACKED_CT_EV_WHITELIST_PACKED_CT_EV_WHITELIST_H_ | 5 #ifndef COMPONENTS_PACKED_CT_EV_WHITELIST_PACKED_CT_EV_WHITELIST_H_ |
6 #define COMPONENTS_PACKED_CT_EV_WHITELIST_PACKED_CT_EV_WHITELIST_H_ | 6 #define COMPONENTS_PACKED_CT_EV_WHITELIST_PACKED_CT_EV_WHITELIST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/version.h" | 15 #include "base/version.h" |
16 #include "net/cert/ct_ev_whitelist.h" | 16 #include "net/cert/ct_ev_whitelist.h" |
17 | 17 |
18 namespace base { | |
19 class FilePath; | |
20 } | |
21 | |
22 namespace packed_ct_ev_whitelist { | 18 namespace packed_ct_ev_whitelist { |
23 | 19 |
24 // An implementation of the EVCertsWhitelist that gets its data packed using | 20 // An implementation of the EVCertsWhitelist that gets its data packed using |
25 // Golomb coding to encode the difference between subsequent hash values. | 21 // Golomb coding to encode the difference between subsequent hash values. |
26 // Format of the packed list: | 22 // Format of the packed list: |
27 // * First 8 bytes: First hash | 23 // * First 8 bytes: First hash |
28 // * Repeating Golomb-coded number which is the numeric difference of the | 24 // * Repeating Golomb-coded number which is the numeric difference of the |
29 // previous hash value from this one | 25 // previous hash value from this one |
30 // | 26 // |
31 // The resulting, unpacked list is a sorted list of hash values that can be | 27 // The resulting, unpacked list is a sorted list of hash values that can be |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 }; | 77 }; |
82 | 78 |
83 // Sets the EV certificate hashes whitelist in the SSLConfigService | 79 // Sets the EV certificate hashes whitelist in the SSLConfigService |
84 // to the provided |whitelist|, if valid. Otherwise, does nothing. | 80 // to the provided |whitelist|, if valid. Otherwise, does nothing. |
85 // To set the new whitelist, this function dispatches a task to the IO thread. | 81 // To set the new whitelist, this function dispatches a task to the IO thread. |
86 void SetEVCertsWhitelist(scoped_refptr<net::ct::EVCertsWhitelist> whitelist); | 82 void SetEVCertsWhitelist(scoped_refptr<net::ct::EVCertsWhitelist> whitelist); |
87 | 83 |
88 } // namespace packed_ct_ev_whitelist | 84 } // namespace packed_ct_ev_whitelist |
89 | 85 |
90 #endif // COMPONENTS_PACKED_CT_EV_WHITELIST_PACKED_CT_EV_WHITELIST_H_ | 86 #endif // COMPONENTS_PACKED_CT_EV_WHITELIST_PACKED_CT_EV_WHITELIST_H_ |
OLD | NEW |