aboutsummaryrefslogtreecommitdiffstats
path: root/verifier.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-03-14 09:39:48 -0700
committerMark Salyzyn <salyzyn@google.com>2014-03-14 13:51:39 -0700
commitf3bb31c32fa879ccce358c15c93b7bd8582d1756 (patch)
tree0ce9c3520be76db70f29a63fca0b895a028934af /verifier.cpp
parenta7266ef0b1804e3ddeea58bda9a416e807a55f88 (diff)
downloadbootable_recovery-f3bb31c32fa879ccce358c15c93b7bd8582d1756.zip
bootable_recovery-f3bb31c32fa879ccce358c15c93b7bd8582d1756.tar.gz
bootable_recovery-f3bb31c32fa879ccce358c15c93b7bd8582d1756.tar.bz2
Recovery 64-bit compile issues
Change-Id: I92d5abd1a628feab3b0246924fab7f97ba3b9d34
Diffstat (limited to 'verifier.cpp')
-rw-r--r--verifier.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/verifier.cpp b/verifier.cpp
index 0930fbd..019552b 100644
--- a/verifier.cpp
+++ b/verifier.cpp
@@ -152,7 +152,7 @@ int verify_file(const char* path, const Certificate* pKeys, unsigned int numKeys
size_t comment_size = footer[4] + (footer[5] << 8);
size_t signature_start = footer[0] + (footer[1] << 8);
- LOGI("comment is %d bytes; signature %d bytes from end\n",
+ LOGI("comment is %zu bytes; signature %zu bytes from end\n",
comment_size, signature_start);
if (signature_start <= FOOTER_SIZE) {
@@ -292,24 +292,24 @@ int verify_file(const char* path, const Certificate* pKeys, unsigned int numKeys
if (pKeys[i].key_type == Certificate::RSA) {
if (sig_der_length < RSANUMBYTES) {
// "signature" block isn't big enough to contain an RSA block.
- LOGI("signature is too short for RSA key %d\n", i);
+ LOGI("signature is too short for RSA key %zu\n", i);
continue;
}
if (!RSA_verify(pKeys[i].rsa, sig_der, RSANUMBYTES,
hash, pKeys[i].hash_len)) {
- LOGI("failed to verify against RSA key %d\n", i);
+ LOGI("failed to verify against RSA key %zu\n", i);
continue;
}
- LOGI("whole-file signature verified against RSA key %d\n", i);
+ LOGI("whole-file signature verified against RSA key %zu\n", i);
free(sig_der);
return VERIFY_SUCCESS;
} else if (pKeys[i].key_type == Certificate::EC
&& pKeys[i].hash_len == SHA256_DIGEST_SIZE) {
p256_int r, s;
if (!dsa_sig_unpack(sig_der, sig_der_length, &r, &s)) {
- LOGI("Not a DSA signature block for EC key %d\n", i);
+ LOGI("Not a DSA signature block for EC key %zu\n", i);
continue;
}
@@ -317,11 +317,11 @@ int verify_file(const char* path, const Certificate* pKeys, unsigned int numKeys
p256_from_bin(hash, &p256_hash);
if (!p256_ecdsa_verify(&(pKeys[i].ec->x), &(pKeys[i].ec->y),
&p256_hash, &r, &s)) {
- LOGI("failed to verify against EC key %d\n", i);
+ LOGI("failed to verify against EC key %zu\n", i);
continue;
}
- LOGI("whole-file signature verified against EC key %d\n", i);
+ LOGI("whole-file signature verified against EC key %zu\n", i);
free(sig_der);
return VERIFY_SUCCESS;
} else {