| Index: net/cert/x509_util_mac.cc
|
| diff --git a/net/cert/x509_util_mac.cc b/net/cert/x509_util_mac.cc
|
| index c9aa37bc63f15b7c81aeabe837c7ae4c811c779d..930acdb8ea54c65d36cca442a03cd5bcbcbf7929 100644
|
| --- a/net/cert/x509_util_mac.cc
|
| +++ b/net/cert/x509_util_mac.cc
|
| @@ -19,8 +19,8 @@ OSStatus CreatePolicy(const CSSM_OID* policy_oid,
|
| size_t option_length,
|
| SecPolicyRef* policy) {
|
| SecPolicySearchRef search;
|
| - OSStatus err = SecPolicySearchCreate(CSSM_CERT_X_509v3, policy_oid, NULL,
|
| - &search);
|
| + OSStatus err =
|
| + SecPolicySearchCreate(CSSM_CERT_X_509v3, policy_oid, NULL, &search);
|
| if (err)
|
| return err;
|
| err = SecPolicySearchCopyNext(search, policy);
|
| @@ -29,10 +29,8 @@ OSStatus CreatePolicy(const CSSM_OID* policy_oid,
|
| return err;
|
|
|
| if (option_data) {
|
| - CSSM_DATA options_data = {
|
| - option_length,
|
| - reinterpret_cast<uint8_t*>(option_data)
|
| - };
|
| + CSSM_DATA options_data = {option_length,
|
| + reinterpret_cast<uint8_t*>(option_data)};
|
| err = SecPolicySetValue(*policy, &options_data);
|
| if (err) {
|
| CFRelease(*policy);
|
| @@ -44,15 +42,14 @@ OSStatus CreatePolicy(const CSSM_OID* policy_oid,
|
|
|
| } // namespace
|
|
|
| -
|
| OSStatus CreateSSLClientPolicy(SecPolicyRef* policy) {
|
| CSSM_APPLE_TP_SSL_OPTIONS tp_ssl_options;
|
| memset(&tp_ssl_options, 0, sizeof(tp_ssl_options));
|
| tp_ssl_options.Version = CSSM_APPLE_TP_SSL_OPTS_VERSION;
|
| tp_ssl_options.Flags |= CSSM_APPLE_TP_SSL_CLIENT;
|
|
|
| - return CreatePolicy(&CSSMOID_APPLE_TP_SSL, &tp_ssl_options,
|
| - sizeof(tp_ssl_options), policy);
|
| + return CreatePolicy(
|
| + &CSSMOID_APPLE_TP_SSL, &tp_ssl_options, sizeof(tp_ssl_options), policy);
|
| }
|
|
|
| OSStatus CreateSSLServerPolicy(const std::string& hostname,
|
| @@ -65,8 +62,8 @@ OSStatus CreateSSLServerPolicy(const std::string& hostname,
|
| tp_ssl_options.ServerNameLen = hostname.size();
|
| }
|
|
|
| - return CreatePolicy(&CSSMOID_APPLE_TP_SSL, &tp_ssl_options,
|
| - sizeof(tp_ssl_options), policy);
|
| + return CreatePolicy(
|
| + &CSSMOID_APPLE_TP_SSL, &tp_ssl_options, sizeof(tp_ssl_options), policy);
|
| }
|
|
|
| OSStatus CreateBasicX509Policy(SecPolicyRef* policy) {
|
| @@ -99,8 +96,10 @@ OSStatus CreateRevocationPolicies(bool enable_revocation_checking,
|
| tp_crl_options.CrlFlags = CSSM_TP_ACTION_FETCH_CRL_FROM_NET;
|
|
|
| SecPolicyRef crl_policy;
|
| - status = CreatePolicy(&CSSMOID_APPLE_TP_REVOCATION_CRL, &tp_crl_options,
|
| - sizeof(tp_crl_options), &crl_policy);
|
| + status = CreatePolicy(&CSSMOID_APPLE_TP_REVOCATION_CRL,
|
| + &tp_crl_options,
|
| + sizeof(tp_crl_options),
|
| + &crl_policy);
|
| if (status)
|
| return status;
|
| CFArrayAppendValue(policies, crl_policy);
|
| @@ -137,8 +136,10 @@ OSStatus CreateRevocationPolicies(bool enable_revocation_checking,
|
| }
|
|
|
| SecPolicyRef ocsp_policy;
|
| - status = CreatePolicy(&CSSMOID_APPLE_TP_REVOCATION_OCSP, &tp_ocsp_options,
|
| - sizeof(tp_ocsp_options), &ocsp_policy);
|
| + status = CreatePolicy(&CSSMOID_APPLE_TP_REVOCATION_OCSP,
|
| + &tp_ocsp_options,
|
| + sizeof(tp_ocsp_options),
|
| + &ocsp_policy);
|
| if (status)
|
| return status;
|
| CFArrayAppendValue(policies, ocsp_policy);
|
| @@ -149,9 +150,7 @@ OSStatus CreateRevocationPolicies(bool enable_revocation_checking,
|
| }
|
|
|
| CSSMFieldValue::CSSMFieldValue()
|
| - : cl_handle_(CSSM_INVALID_HANDLE),
|
| - oid_(NULL),
|
| - field_(NULL) {
|
| + : cl_handle_(CSSM_INVALID_HANDLE), oid_(NULL), field_(NULL) {
|
| }
|
| CSSMFieldValue::CSSMFieldValue(CSSM_CL_HANDLE cl_handle,
|
| const CSSM_OID* oid,
|
| @@ -212,9 +211,12 @@ OSStatus CSSMCachedCertificate::GetField(const CSSM_OID* field_oid,
|
| CSSM_DATA_PTR field_ptr = NULL;
|
| CSSM_HANDLE results_handle = CSSM_INVALID_HANDLE;
|
| uint32 field_value_count = 0;
|
| - CSSM_RETURN status = CSSM_CL_CertGetFirstCachedFieldValue(
|
| - cl_handle_, cached_cert_handle_, oid, &results_handle,
|
| - &field_value_count, &field_ptr);
|
| + CSSM_RETURN status = CSSM_CL_CertGetFirstCachedFieldValue(cl_handle_,
|
| + cached_cert_handle_,
|
| + oid,
|
| + &results_handle,
|
| + &field_value_count,
|
| + &field_ptr);
|
| if (status)
|
| return status;
|
|
|
|
|