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

Unified Diff: firmware/lib/cryptolib/rsa_utility.c

Issue 3184014: Add explicit typecasts so it compiles using MSVC. (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Created 10 years, 4 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 | firmware/version.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firmware/lib/cryptolib/rsa_utility.c
diff --git a/firmware/lib/cryptolib/rsa_utility.c b/firmware/lib/cryptolib/rsa_utility.c
index 3b82c061e4ce6fddf181c76b64602a007938eb2a..cd127107ee4b752066a2e70db419e9103e62fc9f 100644
--- a/firmware/lib/cryptolib/rsa_utility.c
+++ b/firmware/lib/cryptolib/rsa_utility.c
@@ -11,7 +11,7 @@
int RSAProcessedKeySize(unsigned int algorithm, int* out_size) {
int key_len; /* Key length in bytes. */
- if (algorithm < kNumAlgorithms) {
+ if (algorithm < (unsigned int)kNumAlgorithms) {
key_len = siglen_map[algorithm];
/* Total size needed by a RSAPublicKey structure is =
* 2 * key_len bytes for the n and rr arrays
@@ -85,7 +85,7 @@ int RSAVerifyBinary_f(const uint8_t* key_blob,
int sig_size;
int success;
- if (algorithm >= kNumAlgorithms)
+ if (algorithm >= (unsigned int)kNumAlgorithms)
return 0; /* Invalid algorithm. */
if (!RSAProcessedKeySize(algorithm, &key_size))
return 0;
@@ -124,7 +124,7 @@ int RSAVerifyBinaryWithDigest_f(const uint8_t* key_blob,
int sig_size;
int success;
- if (algorithm >= kNumAlgorithms)
+ if (algorithm >= (unsigned int)kNumAlgorithms)
return 0; /* Invalid algorithm. */
if (!RSAProcessedKeySize(algorithm, &key_size))
return 0;
« no previous file with comments | « no previous file | firmware/version.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698