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 #include "chrome/common/safe_browsing/binary_feature_extractor.h" | 5 #include "chrome/common/safe_browsing/binary_feature_extractor.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <softpub.h> | 8 #include <softpub.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
11 #include <wintrust.h> | 11 #include <wintrust.h> |
12 | 12 |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "chrome/common/safe_browsing/csd.pb.h" | |
16 #include "chrome/common/safe_browsing/pe_image_reader_win.h" | 15 #include "chrome/common/safe_browsing/pe_image_reader_win.h" |
| 16 #include "components/safe_browsing/csd.pb.h" |
17 | 17 |
18 namespace safe_browsing { | 18 namespace safe_browsing { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // An EnumCertificatesCallback that collects each SignedData blob. | 22 // An EnumCertificatesCallback that collects each SignedData blob. |
23 bool OnCertificateEntry(uint16_t revision, | 23 bool OnCertificateEntry(uint16_t revision, |
24 uint16_t certificate_type, | 24 uint16_t certificate_type, |
25 const uint8_t* certificate_data, | 25 const uint8_t* certificate_data, |
26 size_t certificate_data_size, | 26 size_t certificate_data_size, |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 } | 160 } |
161 | 161 |
162 if (signed_data) | 162 if (signed_data) |
163 pe_image.EnumCertificates(&OnCertificateEntry, signed_data); | 163 pe_image.EnumCertificates(&OnCertificateEntry, signed_data); |
164 | 164 |
165 return true; | 165 return true; |
166 } | 166 } |
167 | 167 |
168 } // namespace safe_browsing | 168 } // namespace safe_browsing |
OLD | NEW |