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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 // zero. Thus NOT having the bit set is equivalent to having found a | 797 // zero. Thus NOT having the bit set is equivalent to having found a |
798 // matching certificate. | 798 // matching certificate. |
799 if (!(store_search_flags & CERT_STORE_SIGNATURE_FLAG)) { | 799 if (!(store_search_flags & CERT_STORE_SIGNATURE_FLAG)) { |
800 // No need to dupe; reference is held. | 800 // No need to dupe; reference is held. |
801 issuer_cert.reset(previous_cert); | 801 issuer_cert.reset(previous_cert); |
802 break; | 802 break; |
803 } | 803 } |
804 } | 804 } |
805 if (issuer_cert) | 805 if (issuer_cert) |
806 break; | 806 break; |
807 if (GetLastError() == CRYPT_E_SELF_SIGNED) { | 807 if (GetLastError() == static_cast<DWORD>(CRYPT_E_SELF_SIGNED)) { |
808 issuer_cert.reset(CertDuplicateCertificateContext(subject_cert)); | 808 issuer_cert.reset(CertDuplicateCertificateContext(subject_cert)); |
809 break; | 809 break; |
810 } | 810 } |
811 } | 811 } |
812 | 812 |
813 // At this point, the Microsoft provider opens up the "CA", "Root", and | 813 // At this point, the Microsoft provider opens up the "CA", "Root", and |
814 // "SPC" stores to search for the issuer certificate, if not found in the | 814 // "SPC" stores to search for the issuer certificate, if not found in the |
815 // caller-supplied stores. It is unclear whether that is necessary here. | 815 // caller-supplied stores. It is unclear whether that is necessary here. |
816 } | 816 } |
817 | 817 |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 return MapCertStatusToNetError(verify_result->cert_status); | 1144 return MapCertStatusToNetError(verify_result->cert_status); |
1145 | 1145 |
1146 if (ev_policy_oid && | 1146 if (ev_policy_oid && |
1147 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { | 1147 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { |
1148 verify_result->cert_status |= CERT_STATUS_IS_EV; | 1148 verify_result->cert_status |= CERT_STATUS_IS_EV; |
1149 } | 1149 } |
1150 return OK; | 1150 return OK; |
1151 } | 1151 } |
1152 | 1152 |
1153 } // namespace net | 1153 } // namespace net |
OLD | NEW |