aboutsummaryrefslogtreecommitdiff
path: root/bpkg/fetch
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-01-24 14:46:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-01-30 12:32:32 +0200
commit67a0e8d70f0caf8b85e0cf2031333236b2a3dcdf (patch)
tree3a7d71cd1553338cccb19190dc47bfceafd52499 /bpkg/fetch
parentcf86194e91d55464f9c137258e4157415d196697 (diff)
Add checksum verification
Diffstat (limited to 'bpkg/fetch')
-rw-r--r--bpkg/fetch9
1 files changed, 9 insertions, 0 deletions
diff --git a/bpkg/fetch b/bpkg/fetch
index 18dd665..06c2d15 100644
--- a/bpkg/fetch
+++ b/bpkg/fetch
@@ -5,18 +5,27 @@
#ifndef BPKG_FETCH
#define BPKG_FETCH
+#include <exception>
+
#include <bpkg/manifest>
#include <bpkg/types>
#include <bpkg/utility>
+
#include <bpkg/common-options>
namespace bpkg
{
+ class checksum_mismatch: public std::exception {};
+
repository_manifests fetch_repositories (const dir_path&,
bool ignore_unknown);
+
+ // Verify the checksum and throw checksum_mismatch if it doesn't match.
+ //
repository_manifests fetch_repositories (const common_options&,
const repository_location&,
+ const string& sha256sum,
bool ignore_unknown);
package_manifests fetch_packages (const dir_path&,