| 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 #ifndef NET_CERT_X509_UTIL_MAC_H_ | 5 #ifndef NET_CERT_X509_UTIL_MAC_H_ |
| 6 #define NET_CERT_X509_UTIL_MAC_H_ | 6 #define NET_CERT_X509_UTIL_MAC_H_ |
| 7 | 7 |
| 8 #include <CoreFoundation/CFArray.h> | 8 #include <CoreFoundation/CFArray.h> |
| 9 #include <Security/Security.h> | 9 #include <Security/Security.h> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // performed. | 50 // performed. |
| 51 // If both are false, then the policies returned will be explicitly | 51 // If both are false, then the policies returned will be explicitly |
| 52 // prohibited from accessing the network or the local cache, regardless of | 52 // prohibited from accessing the network or the local cache, regardless of |
| 53 // system settings. | 53 // system settings. |
| 54 // If the policies are successfully created, they will be appended to | 54 // If the policies are successfully created, they will be appended to |
| 55 // |policies|. | 55 // |policies|. |
| 56 OSStatus NET_EXPORT CreateRevocationPolicies(bool enable_revocation_checking, | 56 OSStatus NET_EXPORT CreateRevocationPolicies(bool enable_revocation_checking, |
| 57 bool enable_ev_checking, | 57 bool enable_ev_checking, |
| 58 CFMutableArrayRef policies); | 58 CFMutableArrayRef policies); |
| 59 | 59 |
| 60 // CSSM functions are deprecated as of OSX 10.7, but have no replacement. |
| 61 // https://bugs.chromium.org/p/chromium/issues/detail?id=590914#c1 |
| 62 #pragma clang diagnostic push |
| 63 #pragma clang diagnostic ignored "-Wdeprecated-declarations" |
| 64 |
| 60 // Wrapper for a CSSM_DATA_PTR that was obtained via one of the CSSM field | 65 // Wrapper for a CSSM_DATA_PTR that was obtained via one of the CSSM field |
| 61 // accessors (such as CSSM_CL_CertGet[First/Next]Value or | 66 // accessors (such as CSSM_CL_CertGet[First/Next]Value or |
| 62 // CSSM_CL_CertGet[First/Next]CachedValue). | 67 // CSSM_CL_CertGet[First/Next]CachedValue). |
| 63 class CSSMFieldValue { | 68 class CSSMFieldValue { |
| 64 public: | 69 public: |
| 65 CSSMFieldValue(); | 70 CSSMFieldValue(); |
| 66 CSSMFieldValue(CSSM_CL_HANDLE cl_handle, | 71 CSSMFieldValue(CSSM_CL_HANDLE cl_handle, |
| 67 const CSSM_OID* oid, | 72 const CSSM_OID* oid, |
| 68 CSSM_DATA_PTR field); | 73 CSSM_DATA_PTR field); |
| 69 ~CSSMFieldValue(); | 74 ~CSSMFieldValue(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // If |field_oid| is a valid OID and is present in the current certificate, | 130 // If |field_oid| is a valid OID and is present in the current certificate, |
| 126 // returns CSSM_OK and stores the first value in |field|. If additional | 131 // returns CSSM_OK and stores the first value in |field|. If additional |
| 127 // values are associated with |field_oid|, they are ignored. | 132 // values are associated with |field_oid|, they are ignored. |
| 128 OSStatus GetField(const CSSM_OID* field_oid, CSSMFieldValue* field) const; | 133 OSStatus GetField(const CSSM_OID* field_oid, CSSMFieldValue* field) const; |
| 129 | 134 |
| 130 private: | 135 private: |
| 131 CSSM_CL_HANDLE cl_handle_; | 136 CSSM_CL_HANDLE cl_handle_; |
| 132 CSSM_HANDLE cached_cert_handle_; | 137 CSSM_HANDLE cached_cert_handle_; |
| 133 }; | 138 }; |
| 134 | 139 |
| 140 #pragma clang diagnostic pop // "-Wdeprecated-declarations" |
| 141 |
| 135 } // namespace x509_util | 142 } // namespace x509_util |
| 136 | 143 |
| 137 } // namespace net | 144 } // namespace net |
| 138 | 145 |
| 139 #endif // NET_CERT_X509_UTIL_MAC_H_ | 146 #endif // NET_CERT_X509_UTIL_MAC_H_ |
| OLD | NEW |