Skip to content

Commit 4d90560

Browse files
author
Mike
committed
Dump C2PA outside of manifest loop
1 parent 9c7a4e9 commit 4d90560

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/main/com/bfo/box/C2PAHelper.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -537,17 +537,17 @@ public static void main(String[] args) throws Exception {
537537
rawout.close();
538538
outc2pa = null;
539539
}
540+
if (boxdebug) {
541+
System.out.println(c2pa.dump(null, null));
542+
}
543+
if (debug) {
544+
System.out.println(c2pa.toJson().toString(new JsonWriteOptions().setPretty(true).setCborDiag("hex")));
545+
}
540546
// List<C2PAManifest> manifests = c2pa.getManifests(); // to validate ALL manifests
541547
List<C2PAManifest> manifests = Collections.<C2PAManifest>singletonList(c2pa.getActiveManifest()); // validate only current manifest
542548
for (C2PAManifest manifest : manifests) {
543549
in = new FileInputStream(inname);
544550
manifest.setInputStream(in);
545-
if (debug) {
546-
System.out.println(c2pa.toJson().toString(new JsonWriteOptions().setPretty(true).setCborDiag("hex")));
547-
}
548-
if (boxdebug) {
549-
System.out.println(c2pa.dump(null, null));
550-
}
551551
System.out.println("# verifying " + (manifest == c2pa.getActiveManifest() ? "active " : "") + "manifest \"" + manifest.label() + "\"");
552552
List<C2PAStatus> status = manifest.getSignature().verify(null);
553553
boolean ok = true;

0 commit comments

Comments
 (0)