aboutsummaryrefslogtreecommitdiffstats
path: root/minzip/Zip.h
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2014-01-13 14:16:58 -0800
committerDoug Zongker <dougz@android.com>2014-01-16 13:29:28 -0800
commit99916f0496cfe37891d40f21a9a0e387620a8a60 (patch)
tree6b457a65cfdf482fec027386fcd7d197586c67b2 /minzip/Zip.h
parent0708239c003a1537c9cbf98dea5a490955d667aa (diff)
downloadbootable_recovery-99916f0496cfe37891d40f21a9a0e387620a8a60.zip
bootable_recovery-99916f0496cfe37891d40f21a9a0e387620a8a60.tar.gz
bootable_recovery-99916f0496cfe37891d40f21a9a0e387620a8a60.tar.bz2
do verification and extraction on memory, not files
Changes minzip and recovery's file signature verification to work on memory regions, rather than files. For packages which are regular files, install.cpp now mmap()s them into memory and then passes the mapped memory to the verifier and to the minzip library. Support for files which are raw block maps (which will be used when we have packages written to encrypted data partitions) is present but largely untested so far. Bug: 12188746 Change-Id: I12cc3e809834745a489dd9d4ceb558cbccdc3f71
Diffstat (limited to 'minzip/Zip.h')
-rw-r--r--minzip/Zip.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/minzip/Zip.h b/minzip/Zip.h
index c942828..05a2e60 100644
--- a/minzip/Zip.h
+++ b/minzip/Zip.h
@@ -46,11 +46,11 @@ typedef struct ZipEntry {
* One Zip archive. Treat as opaque.
*/
typedef struct ZipArchive {
- int fd;
- unsigned int numEntries;
- ZipEntry* pEntries;
- HashTable* pHash; // maps file name to ZipEntry
- MemMapping map;
+ unsigned int numEntries;
+ ZipEntry* pEntries;
+ HashTable* pHash; // maps file name to ZipEntry
+ unsigned char* addr;
+ size_t length;
} ZipArchive;
/*
@@ -68,7 +68,7 @@ typedef struct {
* On success, returns 0 and populates "pArchive". Returns nonzero errno
* value on failure.
*/
-int mzOpenZipArchive(const char* fileName, ZipArchive* pArchive);
+int mzOpenZipArchive(unsigned char* addr, size_t length, ZipArchive* pArchive);
/*
* Close archive, releasing resources associated with it.