Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: net/cert/cert_verify_proc_win.cc

Issue 1683673002: Fix -Wsign-compare warning after https://codereview.chromium.org/1557133002 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698