summaryrefslogtreecommitdiff
path: root/src/pkl.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-08-17 00:45:59 +0100
committerCarl Hetherington <cth@carlh.net>2018-08-17 00:46:19 +0100
commit01e08cb5fef34a33524e404ae8e2ad7d029d0a22 (patch)
treeb2512bdbb9376cf95b233ab58d0ecd25a86a55f1 /src/pkl.cc
parent2f6087e528c1a48fed0ac7166b1ff8704684c87a (diff)
Use PKL when verifying DCPs.
Diffstat (limited to 'src/pkl.cc')
-rw-r--r--src/pkl.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pkl.cc b/src/pkl.cc
index 236313aa..a46ab313 100644
--- a/src/pkl.cc
+++ b/src/pkl.cc
@@ -35,6 +35,7 @@
#include "exceptions.h"
#include "util.h"
#include "raw_convert.h"
+#include "dcp_assert.h"
#include <libxml++/libxml++.h>
#include <boost/foreach.hpp>
@@ -112,3 +113,15 @@ PKL::write (boost::filesystem::path file, shared_ptr<const CertificateChain> sig
doc.write_to_file (file.string(), "UTF-8");
}
+
+string
+PKL::hash (string id) const
+{
+ BOOST_FOREACH (shared_ptr<Asset> i, _asset_list) {
+ if (i->id() == id) {
+ return i->hash;
+ }
+ }
+
+ DCP_ASSERT (false);
+}