Index: net/cert/cert_verify_proc_openssl.cc |
diff --git a/net/cert/cert_verify_proc_openssl.cc b/net/cert/cert_verify_proc_openssl.cc |
index 0122fac6089b897235776b26e5b2249cbb42cf5d..7643240dbca73463bb235fae701df17bbc95b035 100644 |
--- a/net/cert/cert_verify_proc_openssl.cc |
+++ b/net/cert/cert_verify_proc_openssl.cc |
@@ -101,7 +101,7 @@ void GetCertChainInfo(X509_STORE_CTX* store_ctx, |
STACK_OF(X509)* chain = X509_STORE_CTX_get_chain(store_ctx); |
X509* verified_cert = NULL; |
std::vector<X509*> verified_chain; |
- for (int i = 0; i < sk_X509_num(chain); ++i) { |
+ for (size_t i = 0; i < sk_X509_num(chain); ++i) { |
X509* cert = sk_X509_value(chain, i); |
if (i == 0) { |
verified_cert = cert; |
@@ -111,7 +111,7 @@ void GetCertChainInfo(X509_STORE_CTX* store_ctx, |
// Only check the algorithm status for certificates that are not in the |
// trust store. |
- if (i < store_ctx->last_untrusted) { |
+ if (i < static_cast<size_t>(store_ctx->last_untrusted)) { |
int sig_alg = OBJ_obj2nid(cert->sig_alg->algorithm); |
if (sig_alg == NID_md2WithRSAEncryption) { |
verify_result->has_md2 = true; |
@@ -151,7 +151,7 @@ void GetCertChainInfo(X509_STORE_CTX* store_ctx, |
void AppendPublicKeyHashes(X509_STORE_CTX* store_ctx, |
HashValueVector* hashes) { |
STACK_OF(X509)* chain = X509_STORE_CTX_get_chain(store_ctx); |
- for (int i = 0; i < sk_X509_num(chain); ++i) { |
+ for (size_t i = 0; i < sk_X509_num(chain); ++i) { |
X509* cert = sk_X509_value(chain, i); |
std::string der_data; |