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

Unified Diff: components/client_update_protocol/ecdsa.cc

Issue 2768033002: Use size_t in crypto::SignatureVerifier. (Closed)
Patch Set: . Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/crx_file/crx_file.cc » ('j') | crypto/signature_verifier.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/client_update_protocol/ecdsa.cc
diff --git a/components/client_update_protocol/ecdsa.cc b/components/client_update_protocol/ecdsa.cc
index 71547936a35cc19790a291e713a147d90dd29b73..38faa9aba88f2b0e10065ad533d05b2995ccccd5 100644
--- a/components/client_update_protocol/ecdsa.cc
+++ b/components/client_update_protocol/ecdsa.cc
@@ -170,10 +170,9 @@ bool Ecdsa::ValidateResponse(const base::StringPiece& response_body,
// Initialize the signature verifier.
crypto::SignatureVerifier verifier;
- if (!verifier.VerifyInit(
- crypto::SignatureVerifier::ECDSA_SHA256, &signature.front(),
- static_cast<int>(signature.size()), &public_key_.front(),
- static_cast<int>(public_key_.size()))) {
+ if (!verifier.VerifyInit(crypto::SignatureVerifier::ECDSA_SHA256,
+ &signature.front(), signature.size(),
+ &public_key_.front(), public_key_.size())) {
DVLOG(1) << "Couldn't init SignatureVerifier.";
return false;
}
@@ -184,7 +183,7 @@ bool Ecdsa::ValidateResponse(const base::StringPiece& response_body,
// client assembled -- implying that either request body or response body
// was modified, or a different nonce value was used.
verifier.VerifyUpdate(&signed_message_hash.front(),
- static_cast<int>(signed_message_hash.size()));
+ signed_message_hash.size());
return verifier.VerifyFinal();
}
« no previous file with comments | « no previous file | components/crx_file/crx_file.cc » ('j') | crypto/signature_verifier.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698