| 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/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 } else if (crl_set_result == kCRLSetUnknown && | 640 } else if (crl_set_result == kCRLSetUnknown && |
| 641 (flags & CertVerifier::VERIFY_REV_CHECKING_ENABLED_EV_ONLY) && | 641 (flags & CertVerifier::VERIFY_REV_CHECKING_ENABLED_EV_ONLY) && |
| 642 !rev_checking_enabled && | 642 !rev_checking_enabled && |
| 643 ev_policy_oid != NULL) { | 643 ev_policy_oid != NULL) { |
| 644 // We don't have fresh information about this chain from the CRLSet and | 644 // We don't have fresh information about this chain from the CRLSet and |
| 645 // it's probably an EV certificate. Retry with online revocation checking. | 645 // it's probably an EV certificate. Retry with online revocation checking. |
| 646 rev_checking_enabled = true; | 646 rev_checking_enabled = true; |
| 647 chain_flags &= ~CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY; | 647 chain_flags &= ~CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY; |
| 648 verify_result->cert_status |= CERT_STATUS_REV_CHECKING_ENABLED; | 648 verify_result->cert_status |= CERT_STATUS_REV_CHECKING_ENABLED; |
| 649 | 649 |
| 650 CertFreeCertificateChain(chain_context); |
| 650 if (!CertGetCertificateChain( | 651 if (!CertGetCertificateChain( |
| 651 chain_engine, | 652 chain_engine, |
| 652 cert_list.get(), | 653 cert_list.get(), |
| 653 NULL, // current system time | 654 NULL, // current system time |
| 654 cert_list->hCertStore, | 655 cert_list->hCertStore, |
| 655 &chain_para, | 656 &chain_para, |
| 656 chain_flags, | 657 chain_flags, |
| 657 NULL, // reserved | 658 NULL, // reserved |
| 658 &chain_context)) { | 659 &chain_context)) { |
| 659 verify_result->cert_status |= CERT_STATUS_INVALID; | 660 verify_result->cert_status |= CERT_STATUS_INVALID; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 return MapCertStatusToNetError(verify_result->cert_status); | 782 return MapCertStatusToNetError(verify_result->cert_status); |
| 782 | 783 |
| 783 if (ev_policy_oid && | 784 if (ev_policy_oid && |
| 784 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { | 785 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { |
| 785 verify_result->cert_status |= CERT_STATUS_IS_EV; | 786 verify_result->cert_status |= CERT_STATUS_IS_EV; |
| 786 } | 787 } |
| 787 return OK; | 788 return OK; |
| 788 } | 789 } |
| 789 | 790 |
| 790 } // namespace net | 791 } // namespace net |
| OLD | NEW |