apkverify: add ziputil
apkverify doesn't need all zip features. ziputil provides zip_sections()
to discover the layout of a zip file.
Bug: 190343842
Test: cargo test
Change-Id: Ib6354828cebe819fd3f48265089815ccf29f18ea
diff --git a/apkverify/src/v3.rs b/apkverify/src/v3.rs
index 75551db..0a292df 100644
--- a/apkverify/src/v3.rs
+++ b/apkverify/src/v3.rs
@@ -79,8 +79,8 @@
/// Verifies APK Signature Scheme v3 signatures of the provided APK and returns the certificates
/// associated with each signer.
pub fn verify<P: AsRef<Path>>(path: P) -> Result<()> {
- let mut f = File::open(path.as_ref())?;
- let signature = find_signature(&mut f, APK_SIGNATURE_SCHEME_V3_BLOCK_ID)?;
+ let f = File::open(path.as_ref())?;
+ let signature = find_signature(f, APK_SIGNATURE_SCHEME_V3_BLOCK_ID)?;
verify_signature(&signature.signature_block)?;
Ok(())
}