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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 | 715 |
716 ScopedPCCERT_CHAIN_CONTEXT scoped_chain_context(chain_context); | 716 ScopedPCCERT_CHAIN_CONTEXT scoped_chain_context(chain_context); |
717 | 717 |
718 verify_result->cert_status |= MapCertChainErrorStatusToCertStatus( | 718 verify_result->cert_status |= MapCertChainErrorStatusToCertStatus( |
719 chain_context->TrustStatus.dwErrorStatus); | 719 chain_context->TrustStatus.dwErrorStatus); |
720 | 720 |
721 // Flag certificates that have a Subject common name with a NULL character. | 721 // Flag certificates that have a Subject common name with a NULL character. |
722 if (CertSubjectCommonNameHasNull(cert_handle)) | 722 if (CertSubjectCommonNameHasNull(cert_handle)) |
723 verify_result->cert_status |= CERT_STATUS_INVALID; | 723 verify_result->cert_status |= CERT_STATUS_INVALID; |
724 | 724 |
725 std::wstring wstr_hostname = ASCIIToWide(hostname); | 725 std::wstring wstr_hostname = base::ASCIIToWide(hostname); |
726 | 726 |
727 SSL_EXTRA_CERT_CHAIN_POLICY_PARA extra_policy_para; | 727 SSL_EXTRA_CERT_CHAIN_POLICY_PARA extra_policy_para; |
728 memset(&extra_policy_para, 0, sizeof(extra_policy_para)); | 728 memset(&extra_policy_para, 0, sizeof(extra_policy_para)); |
729 extra_policy_para.cbSize = sizeof(extra_policy_para); | 729 extra_policy_para.cbSize = sizeof(extra_policy_para); |
730 extra_policy_para.dwAuthType = AUTHTYPE_SERVER; | 730 extra_policy_para.dwAuthType = AUTHTYPE_SERVER; |
731 // Certificate name validation happens separately, later, using an internal | 731 // Certificate name validation happens separately, later, using an internal |
732 // routine that has better support for RFC 6125 name matching. | 732 // routine that has better support for RFC 6125 name matching. |
733 extra_policy_para.fdwChecks = | 733 extra_policy_para.fdwChecks = |
734 0x00001000; // SECURITY_FLAG_IGNORE_CERT_CN_INVALID | 734 0x00001000; // SECURITY_FLAG_IGNORE_CERT_CN_INVALID |
735 extra_policy_para.pwszServerName = | 735 extra_policy_para.pwszServerName = |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 return MapCertStatusToNetError(verify_result->cert_status); | 784 return MapCertStatusToNetError(verify_result->cert_status); |
785 | 785 |
786 if (ev_policy_oid && | 786 if (ev_policy_oid && |
787 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { | 787 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { |
788 verify_result->cert_status |= CERT_STATUS_IS_EV; | 788 verify_result->cert_status |= CERT_STATUS_IS_EV; |
789 } | 789 } |
790 return OK; | 790 return OK; |
791 } | 791 } |
792 | 792 |
793 } // namespace net | 793 } // namespace net |
OLD | NEW |