| 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/ssl/client_cert_store_impl.h" | 5 #include "net/ssl/client_cert_store_impl.h" |
| 6 | 6 |
| 7 #include <CommonCrypto/CommonDigest.h> | 7 #include <CommonCrypto/CommonDigest.h> |
| 8 #include <CoreFoundation/CFArray.h> | 8 #include <CoreFoundation/CFArray.h> |
| 9 #include <CoreServices/CoreServices.h> | 9 #include <CoreServices/CoreServices.h> |
| 10 #include <Security/SecBase.h> | 10 #include <Security/SecBase.h> |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 240 |
| 241 if (err != errSecItemNotFound) { | 241 if (err != errSecItemNotFound) { |
| 242 OSSTATUS_LOG(ERROR, err) << "SecIdentitySearch error"; | 242 OSSTATUS_LOG(ERROR, err) << "SecIdentitySearch error"; |
| 243 return false; | 243 return false; |
| 244 } | 244 } |
| 245 | 245 |
| 246 return GetClientCertsImpl(preferred_cert, regular_certs, request, true, | 246 return GetClientCertsImpl(preferred_cert, regular_certs, request, true, |
| 247 selected_certs); | 247 selected_certs); |
| 248 } | 248 } |
| 249 | 249 |
| 250 bool ClientCertStoreImpl::SelectClientCerts(const CertificateList& input_certs, | 250 bool ClientCertStoreImpl::SelectClientCertsForTesting( |
| 251 const SSLCertRequestInfo& request, | 251 const CertificateList& input_certs, |
| 252 CertificateList* selected_certs) { | 252 const SSLCertRequestInfo& request, |
| 253 CertificateList* selected_certs) { |
| 253 return GetClientCertsImpl(NULL, input_certs, request, false, | 254 return GetClientCertsImpl(NULL, input_certs, request, false, |
| 254 selected_certs); | 255 selected_certs); |
| 255 } | 256 } |
| 256 | 257 |
| 257 #if defined(OS_MACOSX) && !defined(OS_IOS) | 258 #if !defined(OS_IOS) |
| 258 bool ClientCertStoreImpl::SelectClientCertsGivenPreferred( | 259 bool ClientCertStoreImpl::SelectClientCertsGivenPreferredForTesting( |
| 259 const scoped_refptr<X509Certificate>& preferred_cert, | 260 const scoped_refptr<X509Certificate>& preferred_cert, |
| 260 const CertificateList& regular_certs, | 261 const CertificateList& regular_certs, |
| 261 const SSLCertRequestInfo& request, | 262 const SSLCertRequestInfo& request, |
| 262 CertificateList* selected_certs) { | 263 CertificateList* selected_certs) { |
| 263 return GetClientCertsImpl(preferred_cert, regular_certs, request, false, | 264 return GetClientCertsImpl(preferred_cert, regular_certs, request, false, |
| 264 selected_certs); | 265 selected_certs); |
| 265 } | 266 } |
| 266 #endif | 267 #endif |
| 267 | 268 |
| 268 } // namespace net | 269 } // namespace net |
| OLD | NEW |