| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #define SECURITY_WIN32 // Needs to be defined before including security.h | 10 #define SECURITY_WIN32 // Needs to be defined before including security.h |
| 11 #include <windows.h> | 11 #include <windows.h> |
| 12 #include <security.h> |
| 12 #include <wincrypt.h> | 13 #include <wincrypt.h> |
| 13 #include <security.h> | |
| 14 | 14 |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "crypto/scoped_capi_types.h" | 16 #include "crypto/scoped_capi_types.h" |
| 17 #include "net/base/x509_util.h" | 17 #include "net/cert/x509_util.h" |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // Callback required by Windows API function CertFindChainInStore(). In addition | 23 // Callback required by Windows API function CertFindChainInStore(). In addition |
| 24 // to filtering by extended/enhanced key usage, we do not show expired | 24 // to filtering by extended/enhanced key usage, we do not show expired |
| 25 // certificates and require digital signature usage in the key usage extension. | 25 // certificates and require digital signature usage in the key usage extension. |
| 26 // | 26 // |
| 27 // This matches our behavior on Mac OS X and that of NSS. It also matches the | 27 // This matches our behavior on Mac OS X and that of NSS. It also matches the |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // copy). | 195 // copy). |
| 196 if (!CertFreeCertificateContext(cert)) | 196 if (!CertFreeCertificateContext(cert)) |
| 197 return false; | 197 return false; |
| 198 } | 198 } |
| 199 | 199 |
| 200 bool rv = GetClientCertsImpl(test_store.get(), request, selected_certs); | 200 bool rv = GetClientCertsImpl(test_store.get(), request, selected_certs); |
| 201 return rv; | 201 return rv; |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace net | 204 } // namespace net |
| OLD | NEW |