Skip to content

Commit

Permalink
Dump C2PA outside of manifest loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike committed Mar 7, 2023
1 parent 9c7a4e9 commit 4d90560
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/com/bfo/box/C2PAHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -537,17 +537,17 @@ public static void main(String[] args) throws Exception {
rawout.close();
outc2pa = null;
}
if (boxdebug) {
System.out.println(c2pa.dump(null, null));
}
if (debug) {
System.out.println(c2pa.toJson().toString(new JsonWriteOptions().setPretty(true).setCborDiag("hex")));
}
// List<C2PAManifest> manifests = c2pa.getManifests(); // to validate ALL manifests
List<C2PAManifest> manifests = Collections.<C2PAManifest>singletonList(c2pa.getActiveManifest()); // validate only current manifest
for (C2PAManifest manifest : manifests) {
in = new FileInputStream(inname);
manifest.setInputStream(in);
if (debug) {
System.out.println(c2pa.toJson().toString(new JsonWriteOptions().setPretty(true).setCborDiag("hex")));
}
if (boxdebug) {
System.out.println(c2pa.dump(null, null));
}
System.out.println("# verifying " + (manifest == c2pa.getActiveManifest() ? "active " : "") + "manifest \"" + manifest.label() + "\"");
List<C2PAStatus> status = manifest.getSignature().verify(null);
boolean ok = true;
Expand Down

0 comments on commit 4d90560

Please sign in to comment.