libopkg: factor out checksum and size verification
authorBaptiste Jonglez <git@bitsofnetworks.org>
Mon, 24 Aug 2020 23:00:29 +0000 (01:00 +0200)
committerPaul Spooren <mail@aparcar.org>
Tue, 24 Nov 2020 22:07:51 +0000 (12:07 -1000)
commit293b1cef8b5a6de64d3fec87c01729b64006713a
treec45485cfc1e5a46cf070a1c0f3e3a6403235a744
parenta786e25f5cbcb9372864a4edf12b7e80774c4514
libopkg: factor out checksum and size verification

This is a sizeable chunk of code that be can pretty well isolated in its
own function.

This refactoring will be necessary for an upcoming feature in which
opkg_download_pkg() will need to verify the checksum of packages in the
cache.  This is the reason why the new function is located in
`opkg_download.c`.

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
libopkg/opkg_download.c
libopkg/opkg_download.h
libopkg/opkg_install.c