| Index: net/ssl/client_cert_store_mac.cc
|
| diff --git a/net/ssl/client_cert_store_mac.cc b/net/ssl/client_cert_store_mac.cc
|
| index 06d7d0613c88560e00116bd86541565da31f4a7a..2ce94db577e6020b47489bb9b5a07c02ab3d3835 100644
|
| --- a/net/ssl/client_cert_store_mac.cc
|
| +++ b/net/ssl/client_cert_store_mac.cc
|
| @@ -49,13 +49,15 @@ OSStatus CopyCertChain(SecCertificateRef cert_handle,
|
|
|
| // Create a SecTrustRef.
|
| ScopedCFTypeRef<CFArrayRef> input_certs(CFArrayCreate(
|
| - NULL, const_cast<const void**>(reinterpret_cast<void**>(&cert_handle)),
|
| - 1, &kCFTypeArrayCallBacks));
|
| + NULL,
|
| + const_cast<const void**>(reinterpret_cast<void**>(&cert_handle)),
|
| + 1,
|
| + &kCFTypeArrayCallBacks));
|
| SecTrustRef trust_ref = NULL;
|
| {
|
| base::AutoLock lock(crypto::GetMacSecurityServicesLock());
|
| - result = SecTrustCreateWithCertificates(input_certs, ssl_policy,
|
| - &trust_ref);
|
| + result =
|
| + SecTrustCreateWithCertificates(input_certs, ssl_policy, &trust_ref);
|
| }
|
| if (result)
|
| return result;
|
| @@ -99,14 +101,15 @@ bool IsIssuedByInKeychain(const std::vector<std::string>& valid_issuers,
|
|
|
| X509Certificate::OSCertHandles intermediates;
|
| for (CFIndex i = 1, chain_count = CFArrayGetCount(cert_chain);
|
| - i < chain_count; ++i) {
|
| + i < chain_count;
|
| + ++i) {
|
| SecCertificateRef cert = reinterpret_cast<SecCertificateRef>(
|
| const_cast<void*>(CFArrayGetValueAtIndex(cert_chain, i)));
|
| intermediates.push_back(cert);
|
| }
|
|
|
| - scoped_refptr<X509Certificate> new_cert(X509Certificate::CreateFromHandle(
|
| - cert_handle, intermediates));
|
| + scoped_refptr<X509Certificate> new_cert(
|
| + X509Certificate::CreateFromHandle(cert_handle, intermediates));
|
| CFRelease(cert_chain); // Also frees |intermediates|.
|
|
|
| if (!new_cert->IsIssuedByEncoded(valid_issuers))
|
| @@ -131,8 +134,8 @@ void GetClientCertsImpl(const scoped_refptr<X509Certificate>& preferred_cert,
|
| CertificateList preliminary_list;
|
| if (preferred_cert.get())
|
| preliminary_list.push_back(preferred_cert);
|
| - preliminary_list.insert(preliminary_list.end(), regular_certs.begin(),
|
| - regular_certs.end());
|
| + preliminary_list.insert(
|
| + preliminary_list.end(), regular_certs.begin(), regular_certs.end());
|
|
|
| selected_certs->clear();
|
| for (size_t i = 0; i < preliminary_list.size(); ++i) {
|
| @@ -172,13 +175,15 @@ void GetClientCertsImpl(const scoped_refptr<X509Certificate>& preferred_cert,
|
|
|
| } // namespace
|
|
|
| -ClientCertStoreMac::ClientCertStoreMac() {}
|
| +ClientCertStoreMac::ClientCertStoreMac() {
|
| +}
|
|
|
| -ClientCertStoreMac::~ClientCertStoreMac() {}
|
| +ClientCertStoreMac::~ClientCertStoreMac() {
|
| +}
|
|
|
| void ClientCertStoreMac::GetClientCerts(const SSLCertRequestInfo& request,
|
| - CertificateList* selected_certs,
|
| - const base::Closure& callback) {
|
| + CertificateList* selected_certs,
|
| + const base::Closure& callback) {
|
| std::string server_domain = request.host_and_port.host();
|
|
|
| ScopedCFTypeRef<SecIdentityRef> preferred_identity;
|
| @@ -231,9 +236,8 @@ void ClientCertStoreMac::GetClientCerts(const SSLCertRequestInfo& request,
|
| continue;
|
| ScopedCFTypeRef<SecCertificateRef> scoped_cert_handle(cert_handle);
|
|
|
| - scoped_refptr<X509Certificate> cert(
|
| - X509Certificate::CreateFromHandle(cert_handle,
|
| - X509Certificate::OSCertHandles()));
|
| + scoped_refptr<X509Certificate> cert(X509Certificate::CreateFromHandle(
|
| + cert_handle, X509Certificate::OSCertHandles()));
|
|
|
| if (preferred_identity && CFEqual(preferred_identity, identity)) {
|
| // Only one certificate should match.
|
| @@ -251,8 +255,8 @@ void ClientCertStoreMac::GetClientCerts(const SSLCertRequestInfo& request,
|
| return;
|
| }
|
|
|
| - GetClientCertsImpl(preferred_cert, regular_certs, request, true,
|
| - selected_certs);
|
| + GetClientCertsImpl(
|
| + preferred_cert, regular_certs, request, true, selected_certs);
|
| callback.Run();
|
| }
|
|
|
|
|