diff options
author | Randall Spangler <rspangler@chromium.org> | 2010-08-19 13:17:48 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2010-08-19 13:17:48 -0700 |
commit | dfeb025750985e163b227c7c5a6c72be9c99b594 (patch) | |
tree | bb6f7ac38bfe72d9d2aa89bc3ab56ef56c6dc4f2 /firmware/lib/cryptolib | |
parent | 4bb5e4bad4bb8dc1e0c3210e36f4a21e85acb06a (diff) | |
download | vboot-dfeb025750985e163b227c7c5a6c72be9c99b594.tar.gz |
Add explicit typecasts so it compiles using MSVC.
BUG=none
TEST=make && make runtests
Review URL: http://codereview.chromium.org/3184014
Diffstat (limited to 'firmware/lib/cryptolib')
-rw-r--r-- | firmware/lib/cryptolib/rsa_utility.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/lib/cryptolib/rsa_utility.c b/firmware/lib/cryptolib/rsa_utility.c index 3b82c061..cd127107 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; |