From 4d03333fd9a1e4bc0508e23054cb6b6442a87d68 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 10 Oct 2015 14:07:32 -0700 Subject: Sort of support signing bundles with entitlements. --- ldid.cpp | 8 ++++---- ldid.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ldid.cpp b/ldid.cpp index 33b1859..049338b 100644 --- a/ldid.cpp +++ b/ldid.cpp @@ -1812,7 +1812,7 @@ struct RuleCode { } }; -std::string Bundle(const std::string &root, Folder &folder, const std::string &key, std::map> &remote) { +std::string Bundle(const std::string &root, Folder &folder, const std::string &key, std::map> &remote, const std::string &entitlements) { std::string executable; std::string identifier; @@ -1873,7 +1873,7 @@ std::string Bundle(const std::string &root, Folder &folder, const std::string &k return; auto bundle(root + Split(name).dir); SubFolder subfolder(folder, bundle); - Bundle(bundle, subfolder, key, local); + Bundle(bundle, subfolder, key, local, ""); })); folder.Find("", fun([&](const std::string &name, const Functor &)> &code) { @@ -1978,7 +1978,7 @@ std::string Bundle(const std::string &root, Folder &folder, const std::string &k slots[3] = local.at(signature); HashProxy proxy(local[executable], save); - Sign(data.data(), data.size(), proxy, identifier, "", key, slots); + Sign(data.data(), data.size(), proxy, identifier, entitlements, key, slots); })); })); @@ -2137,7 +2137,7 @@ int main(int argc, char *argv[]) { _assert(!flag_r); ldid::DiskFolder folder(path); std::map> hashes; - path += "/" + Bundle("", folder, key, hashes); + path += "/" + Bundle("", folder, key, hashes, entitlements); } else if (flag_S || flag_r) { Map input(path, O_RDONLY, PROT_READ, MAP_PRIVATE); diff --git a/ldid.hpp b/ldid.hpp index b7bbdaf..8ea6cf7 100644 --- a/ldid.hpp +++ b/ldid.hpp @@ -106,7 +106,7 @@ class UnionFolder : } }; -std::string Bundle(const std::string &root, Folder &folder, const std::string &key, std::map> &remote); +std::string Bundle(const std::string &root, Folder &folder, const std::string &key, std::map> &remote, const std::string &entitlements); typedef std::map> Slots; -- cgit v1.2.3-56-ge451