OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_util_mac.h" | 5 #include "net/cert/x509_util_mac.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "third_party/apple_apsl/cssmapplePriv.h" | 8 #include "third_party/apple_apsl/cssmapplePriv.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
11 | 11 |
| 12 // CSSM functions are deprecated as of OSX 10.7, but have no replacement. |
| 13 // https://bugs.chromium.org/p/chromium/issues/detail?id=590914#c1 |
| 14 #pragma clang diagnostic push |
| 15 #pragma clang diagnostic ignored "-Wdeprecated-declarations" |
| 16 |
12 namespace x509_util { | 17 namespace x509_util { |
13 | 18 |
14 namespace { | 19 namespace { |
15 | 20 |
16 // Creates a SecPolicyRef for the given OID, with optional value. | 21 // Creates a SecPolicyRef for the given OID, with optional value. |
17 OSStatus CreatePolicy(const CSSM_OID* policy_oid, | 22 OSStatus CreatePolicy(const CSSM_OID* policy_oid, |
18 void* option_data, | 23 void* option_data, |
19 size_t option_length, | 24 size_t option_length, |
20 SecPolicyRef* policy) { | 25 SecPolicyRef* policy) { |
21 SecPolicySearchRef search; | 26 SecPolicySearchRef search; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // Note: |field_value_count| may be > 1, indicating that more than one | 226 // Note: |field_value_count| may be > 1, indicating that more than one |
222 // value is present. This may happen with extensions, but for current | 227 // value is present. This may happen with extensions, but for current |
223 // usages, only the first value is returned. | 228 // usages, only the first value is returned. |
224 CSSM_CL_CertAbortQuery(cl_handle_, results_handle); | 229 CSSM_CL_CertAbortQuery(cl_handle_, results_handle); |
225 field->Reset(cl_handle_, oid, field_ptr); | 230 field->Reset(cl_handle_, oid, field_ptr); |
226 return CSSM_OK; | 231 return CSSM_OK; |
227 } | 232 } |
228 | 233 |
229 } // namespace x509_util | 234 } // namespace x509_util |
230 | 235 |
| 236 #pragma clang diagnostic pop // "-Wdeprecated-declarations" |
| 237 |
231 } // namespace net | 238 } // namespace net |
OLD | NEW |