| OLD | NEW |
| 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 "chrome/browser/safe_browsing/signature_evaluator_mac.h" | 5 #include "chrome/browser/safe_browsing/signature_evaluator_mac.h" |
| 6 | 6 |
| 7 #include <CoreFoundation/CoreFoundation.h> | 7 #include <CoreFoundation/CoreFoundation.h> |
| 8 #include <Foundation/Foundation.h> | 8 #include <Foundation/Foundation.h> |
| 9 #include <Security/Security.h> | 9 #include <Security/Security.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| 11 #include <stdint.h> | 11 #include <stdint.h> |
| 12 #include <sys/xattr.h> | 12 #include <sys/xattr.h> |
| 13 | 13 |
| 14 #include "base/mac/foundation_util.h" | 14 #include "base/mac/foundation_util.h" |
| 15 #include "base/mac/mac_util.h" | 15 #include "base/mac/mac_util.h" |
| 16 #include "base/mac/scoped_cftyperef.h" | 16 #include "base/mac/scoped_cftyperef.h" |
| 17 #include "base/mac/scoped_nsobject.h" | 17 #include "base/mac/scoped_nsobject.h" |
| 18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
| 19 #include "base/strings/sys_string_conversions.h" | 19 #include "base/strings/sys_string_conversions.h" |
| 20 #include "chrome/common/safe_browsing/binary_feature_extractor.h" | 20 #include "chrome/common/safe_browsing/binary_feature_extractor.h" |
| 21 #include "chrome/common/safe_browsing/mach_o_image_reader_mac.h" | 21 #include "chrome/common/safe_browsing/mach_o_image_reader_mac.h" |
| 22 #include "components/safe_browsing/csd.pb.h" | 22 #include "components/safe_browsing/common/csd.pb.h" |
| 23 | 23 |
| 24 namespace safe_browsing { | 24 namespace safe_browsing { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // OS X code signing data can be stored in extended attributes as well. This is | 28 // OS X code signing data can be stored in extended attributes as well. This is |
| 29 // a list of the extended attributes slots currently used in Security.framework, | 29 // a list of the extended attributes slots currently used in Security.framework, |
| 30 // from codesign.h (see the kSecCS_* constants). | 30 // from codesign.h (see the kSecCS_* constants). |
| 31 const char* const xattrs[] = { | 31 const char* const xattrs[] = { |
| 32 "com.apple.cs.CodeDirectory", | 32 "com.apple.cs.CodeDirectory", |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 incident->contained_file(0).relative_path(), | 251 incident->contained_file(0).relative_path(), |
| 252 base::CompareCase::INSENSITIVE_ASCII)) { | 252 base::CompareCase::INSENSITIVE_ASCII)) { |
| 253 return true; | 253 return true; |
| 254 } | 254 } |
| 255 } | 255 } |
| 256 | 256 |
| 257 return false; | 257 return false; |
| 258 } | 258 } |
| 259 | 259 |
| 260 } // namespace safe_browsing | 260 } // namespace safe_browsing |
| OLD | NEW |