Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for writing and reading manifest data from simple PDFs (without incremental updates or signatures) #249

Merged
merged 25 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ no_interleaved_io = ["file_io"]
fetch_remote_manifests = ["file_io"]
openssl_sign = ["openssl"]
json_schema = ["dep:schemars"]
pdf = ["dep:lopdf"]

# The diagnostics feature is unsupported and might be removed.
# It enables some low-overhead timing features used in our development cycle.
Expand Down Expand Up @@ -76,6 +77,7 @@ fast-xml = "0.23.1"
hex = "0.4.3"
img-parts = "0.3.0"
log = "0.4.8"
lopdf = { version = "0.31.0", optional = true }
lazy_static = "1.4.0"
multibase = "0.9.0"
multihash = "0.11.4"
Expand Down
8 changes: 3 additions & 5 deletions sdk/src/claim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1938,12 +1938,10 @@ impl Claim {
// Do any assertions of this type exist?
pub fn has_assertion_type(&self, in_label: &str) -> bool {
let (label, _) = Claim::assertion_label_from_link(in_label);
let found = self
.assertion_store
.iter()
.find(|&x| x.assertion.label().starts_with(&label));

found.is_some()
self.assertion_store
dyro marked this conversation as resolved.
Show resolved Hide resolved
.iter()
.any(|x| x.assertion.label().starts_with(&label))
}

// Create a JUMBF URI from a claim label.
Expand Down
2 changes: 2 additions & 0 deletions sdk/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ pub(crate) mod hash_utils;
pub(crate) mod merkle;
#[allow(dead_code)] // for wasm build
pub(crate) mod patch;
#[cfg(feature = "pdf")]
pub(crate) mod pdf_utils;
#[cfg(feature = "add_thumbnails")]
pub(crate) mod thumbnail;
pub(crate) mod time_it;
Expand Down
Loading
Loading