summaryrefslogtreecommitdiffstats
path: root/verifier.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2009-12-11 00:52:09 +0100
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-11 00:52:09 +0100
commit25215285c4afb686eab90fa48f0965dcdea3564c (patch)
treef9d624ae37090834c91218b1827e190d8d14bdd9 /verifier.c
parentMerge change I117fdea9 (diff)
parentam 73ae31ce: add a simple unit test for the OTA package verifier (diff)
downloadandroid_bootable_recovery-25215285c4afb686eab90fa48f0965dcdea3564c.tar
android_bootable_recovery-25215285c4afb686eab90fa48f0965dcdea3564c.tar.gz
android_bootable_recovery-25215285c4afb686eab90fa48f0965dcdea3564c.tar.bz2
android_bootable_recovery-25215285c4afb686eab90fa48f0965dcdea3564c.tar.lz
android_bootable_recovery-25215285c4afb686eab90fa48f0965dcdea3564c.tar.xz
android_bootable_recovery-25215285c4afb686eab90fa48f0965dcdea3564c.tar.zst
android_bootable_recovery-25215285c4afb686eab90fa48f0965dcdea3564c.zip
Diffstat (limited to 'verifier.c')
-rw-r--r--verifier.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/verifier.c b/verifier.c
index 164fb4a01..9d39fd139 100644
--- a/verifier.c
+++ b/verifier.c
@@ -42,7 +42,7 @@ int verify_file(const char* path, const RSAPublicKey *pKeys, unsigned int numKey
// An archive with a whole-file signature will end in six bytes:
//
- // $ff $ff (2-byte comment size) (2-byte signature start)
+ // (2-byte signature start) $ff $ff (2-byte comment size)
//
// (As far as the ZIP format is concerned, these are part of the
// archive comment.) We start by reading this footer, this tells
@@ -169,7 +169,7 @@ int verify_file(const char* path, const RSAPublicKey *pKeys, unsigned int numKey
const uint8_t* sha1 = SHA_final(&ctx);
for (i = 0; i < numKeys; ++i) {
- // The 6 bytes is the "$ff $ff (signature_start) (comment_size)" that
+ // The 6 bytes is the "(signature_start) $ff $ff (comment_size)" that
// the signing tool appends after the signature itself.
if (RSA_verify(pKeys+i, eocd + eocd_size - 6 - RSANUMBYTES,
RSANUMBYTES, sha1)) {