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/base/cert_verify_proc_win.h" | 5 #include "net/cert/cert_verify_proc_win.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/sha1.h" | 11 #include "base/sha1.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "crypto/capi_util.h" | 14 #include "crypto/capi_util.h" |
15 #include "crypto/scoped_capi_types.h" | 15 #include "crypto/scoped_capi_types.h" |
16 #include "crypto/sha2.h" | 16 #include "crypto/sha2.h" |
17 #include "net/base/asn1_util.h" | |
18 #include "net/base/cert_status_flags.h" | |
19 #include "net/base/cert_verifier.h" | |
20 #include "net/base/cert_verify_result.h" | |
21 #include "net/base/crl_set.h" | |
22 #include "net/base/ev_root_ca_metadata.h" | |
23 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
24 #include "net/base/test_root_certs.h" | 18 #include "net/cert/asn1_util.h" |
25 #include "net/base/x509_certificate.h" | 19 #include "net/cert/cert_status_flags.h" |
26 #include "net/base/x509_certificate_known_roots_win.h" | 20 #include "net/cert/cert_verifier.h" |
| 21 #include "net/cert/cert_verify_result.h" |
| 22 #include "net/cert/crl_set.h" |
| 23 #include "net/cert/ev_root_ca_metadata.h" |
| 24 #include "net/cert/test_root_certs.h" |
| 25 #include "net/cert/x509_certificate.h" |
| 26 #include "net/cert/x509_certificate_known_roots_win.h" |
27 | 27 |
28 #pragma comment(lib, "crypt32.lib") | 28 #pragma comment(lib, "crypt32.lib") |
29 | 29 |
30 #if !defined(CERT_TRUST_HAS_WEAK_SIGNATURE) | 30 #if !defined(CERT_TRUST_HAS_WEAK_SIGNATURE) |
31 // This was introduced in Windows 8 / Windows Server 2012, but retroactively | 31 // This was introduced in Windows 8 / Windows Server 2012, but retroactively |
32 // ported as far back as Windows XP via system update. | 32 // ported as far back as Windows XP via system update. |
33 #define CERT_TRUST_HAS_WEAK_SIGNATURE 0x00100000 | 33 #define CERT_TRUST_HAS_WEAK_SIGNATURE 0x00100000 |
34 #endif | 34 #endif |
35 | 35 |
36 namespace net { | 36 namespace net { |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 return MapCertStatusToNetError(verify_result->cert_status); | 746 return MapCertStatusToNetError(verify_result->cert_status); |
747 | 747 |
748 if (ev_policy_oid && | 748 if (ev_policy_oid && |
749 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { | 749 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { |
750 verify_result->cert_status |= CERT_STATUS_IS_EV; | 750 verify_result->cert_status |= CERT_STATUS_IS_EV; |
751 } | 751 } |
752 return OK; | 752 return OK; |
753 } | 753 } |
754 | 754 |
755 } // namespace net | 755 } // namespace net |
OLD | NEW |