| 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/cert/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/free_deleter.h" | 10 #include "base/memory/free_deleter.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/sha1.h" | 12 #include "base/sha1.h" |
| 13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "base/threading/thread_local.h" | 15 #include "base/threading/thread_local.h" |
| 16 #include "crypto/capi_util.h" | 16 #include "crypto/capi_util.h" |
| 17 #include "crypto/scoped_capi_types.h" | 17 #include "crypto/scoped_capi_types.h" |
| 18 #include "crypto/sha2.h" | 18 #include "crypto/sha2.h" |
| 19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
| 20 #include "net/cert/asn1_util.h" | 20 #include "net/cert/asn1_util.h" |
| 21 #include "net/cert/cert_status_flags.h" | 21 #include "net/cert/cert_status_flags.h" |
| 22 #include "net/cert/cert_verifier.h" | 22 #include "net/cert/cert_verifier.h" |
| 23 #include "net/cert/cert_verify_result.h" | 23 #include "net/cert/cert_verify_result.h" |
| 24 #include "net/cert/crl_set.h" | 24 #include "net/cert/crl_set.h" |
| 25 #include "net/cert/ev_root_ca_metadata.h" | 25 #include "net/cert/ev_root_ca_metadata.h" |
| 26 #include "net/cert/test_root_certs.h" | 26 #include "net/cert/test_root_certs.h" |
| 27 #include "net/cert/x509_certificate.h" | 27 #include "net/cert/x509_certificate.h" |
| 28 #include "net/cert/x509_certificate_known_roots_win.h" | 28 #include "net/cert/x509_certificate_known_roots_win.h" |
| 29 | 29 |
| 30 #pragma comment(lib, "crypt32.lib") | |
| 31 | |
| 32 #if !defined(CERT_TRUST_HAS_WEAK_SIGNATURE) | 30 #if !defined(CERT_TRUST_HAS_WEAK_SIGNATURE) |
| 33 // This was introduced in Windows 8 / Windows Server 2012, but retroactively | 31 // This was introduced in Windows 8 / Windows Server 2012, but retroactively |
| 34 // ported as far back as Windows XP via system update. | 32 // ported as far back as Windows XP via system update. |
| 35 #define CERT_TRUST_HAS_WEAK_SIGNATURE 0x00100000 | 33 #define CERT_TRUST_HAS_WEAK_SIGNATURE 0x00100000 |
| 36 #endif | 34 #endif |
| 37 | 35 |
| 38 namespace net { | 36 namespace net { |
| 39 | 37 |
| 40 namespace { | 38 namespace { |
| 41 | 39 |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 return MapCertStatusToNetError(verify_result->cert_status); | 1143 return MapCertStatusToNetError(verify_result->cert_status); |
| 1146 | 1144 |
| 1147 if (ev_policy_oid && | 1145 if (ev_policy_oid && |
| 1148 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { | 1146 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { |
| 1149 verify_result->cert_status |= CERT_STATUS_IS_EV; | 1147 verify_result->cert_status |= CERT_STATUS_IS_EV; |
| 1150 } | 1148 } |
| 1151 return OK; | 1149 return OK; |
| 1152 } | 1150 } |
| 1153 | 1151 |
| 1154 } // namespace net | 1152 } // namespace net |
| OLD | NEW |