libopkg: factor out checksum and size verification
authorBaptiste Jonglez <git@bitsofnetworks.org>
Mon, 24 Aug 2020 23:00:29 +0000 (01:00 +0200)
committerBaptiste Jonglez <git@bitsofnetworks.org>
Sun, 31 Jan 2021 09:56:08 +0000 (10:56 +0100)
commitb1450301fc381082ccfe3c26728451f6923b50a1
treea8bae3d56fb40cab7251107b9224f13541aa73da
parent74bac7a996cad04b66297c4e1f936a9c696397ef
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>
(cherry picked from commit 293b1cef8b5a6de64d3fec87c01729b64006713a)
libopkg/opkg_download.c
libopkg/opkg_download.h
libopkg/opkg_install.c