| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/x509_cert_types.h" | 5 #include "net/cert/x509_cert_types.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <CoreServices/CoreServices.h> | 9 #include <CoreServices/CoreServices.h> |
| 10 #include <Security/SecAsn1Coder.h> | 10 #include <Security/SecAsn1Coder.h> |
| 11 #include <Security/Security.h> | 11 #include <Security/Security.h> |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/mac/mac_logging.h" | 14 #include "base/mac/mac_logging.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "net/base/net_string_util.h" | 16 #include "net/base/net_string_util.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // CSSM functions are deprecated as of OSX 10.7, but have no replacement. |
| 23 // https://bugs.chromium.org/p/chromium/issues/detail?id=590914#c1 |
| 24 #pragma clang diagnostic push |
| 25 #pragma clang diagnostic ignored "-Wdeprecated-declarations" |
| 26 |
| 22 // The BER encoding of 0.9.2342.19200300.100.1.25. | 27 // The BER encoding of 0.9.2342.19200300.100.1.25. |
| 23 // On 10.6 and later this is available as CSSMOID_DomainComponent, which is an | 28 // On 10.6 and later this is available as CSSMOID_DomainComponent, which is an |
| 24 // external symbol from Security.framework. However, it appears that Apple's | 29 // external symbol from Security.framework. However, it appears that Apple's |
| 25 // implementation improperly encoded this on 10.6+, and even still is | 30 // implementation improperly encoded this on 10.6+, and even still is |
| 26 // unavailable on 10.5, so simply including the raw BER here. | 31 // unavailable on 10.5, so simply including the raw BER here. |
| 27 // | 32 // |
| 28 // Note: CSSM is allowed to store CSSM_OIDs in any arbitrary format desired, | 33 // Note: CSSM is allowed to store CSSM_OIDs in any arbitrary format desired, |
| 29 // as long as the symbols are properly exposed. The fact that Apple's | 34 // as long as the symbols are properly exposed. The fact that Apple's |
| 30 // implementation stores it in BER is an internal implementation detail | 35 // implementation stores it in BER is an internal implementation detail |
| 31 // observed by studying libsecurity_cssm. | 36 // observed by studying libsecurity_cssm. |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 return match(common_name, against.common_name) && | 287 return match(common_name, against.common_name) && |
| 283 match(locality_name, against.locality_name) && | 288 match(locality_name, against.locality_name) && |
| 284 match(state_or_province_name, against.state_or_province_name) && | 289 match(state_or_province_name, against.state_or_province_name) && |
| 285 match(country_name, against.country_name) && | 290 match(country_name, against.country_name) && |
| 286 match(street_addresses, against.street_addresses) && | 291 match(street_addresses, against.street_addresses) && |
| 287 match(organization_names, against.organization_names) && | 292 match(organization_names, against.organization_names) && |
| 288 match(organization_unit_names, against.organization_unit_names) && | 293 match(organization_unit_names, against.organization_unit_names) && |
| 289 match(domain_components, against.domain_components); | 294 match(domain_components, against.domain_components); |
| 290 } | 295 } |
| 291 | 296 |
| 297 #pragma clang diagnostic pop // "-Wdeprecated-declarations" |
| 298 |
| 292 } // namespace net | 299 } // namespace net |
| OLD | NEW |