diff options
author | Timo Teräs <timo.teras@iki.fi> | 2021-07-30 16:38:53 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-07-30 17:54:25 +0300 |
commit | f61eba06275e0339cfc1b844e515121ca8ba281a (patch) | |
tree | 5539c83039b0681a8e3ce7aba4e74e95e364883d /src/apk_io.h | |
parent | 5843daf7a1cdf15cbc76952c60a1d822414b2ef3 (diff) | |
download | apk-tools-f61eba06275e0339cfc1b844e515121ca8ba281a.tar.gz apk-tools-f61eba06275e0339cfc1b844e515121ca8ba281a.tar.bz2 apk-tools-f61eba06275e0339cfc1b844e515121ca8ba281a.tar.xz apk-tools-f61eba06275e0339cfc1b844e515121ca8ba281a.zip |
extract: use extraction api, and implement it for v3 packages
The extract applet now works with both v2 and v3 packages.
Diffstat (limited to 'src/apk_io.h')
-rw-r--r-- | src/apk_io.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/apk_io.h b/src/apk_io.h index 3ad0790..762f9e0 100644 --- a/src/apk_io.h +++ b/src/apk_io.h @@ -135,6 +135,14 @@ struct apk_segment_istream { }; struct apk_istream *apk_istream_segment(struct apk_segment_istream *sis, struct apk_istream *is, size_t len, time_t mtime); +struct apk_digest_istream { + struct apk_istream is; + struct apk_istream *pis; + struct apk_digest *digest; + struct apk_digest_ctx dctx; +}; +struct apk_istream *apk_istream_verify(struct apk_digest_istream *dis, struct apk_istream *is, struct apk_digest *d); + #define APK_ISTREAM_TEE_COPY_META 1 #define APK_ISTREAM_TEE_OPTIONAL 2 |