From dd29a8f0236ef893118cb128a143c37318c62f0e Mon Sep 17 00:00:00 2001 From: "Andy Miller (IMS)" <48326098+amiller-ims@users.noreply.github.com> Date: Thu, 29 Dec 2022 13:26:50 -0800 Subject: [PATCH 1/2] Switch to ConfigurableDocumentLoader --- .../org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java index b70d1c3..024a69f 100644 --- a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java +++ b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/EmbeddedProofProbe.java @@ -17,6 +17,7 @@ import com.apicatalog.multibase.Multibase; import com.apicatalog.multicodec.Multicodec; import com.apicatalog.multicodec.Multicodec.Codec; +import foundation.identity.jsonld.ConfigurableDocumentLoader; import info.weboftrust.ldsignatures.LdProof; import info.weboftrust.ldsignatures.verifier.Ed25519Signature2020LdVerifier; import jakarta.json.JsonObject; @@ -43,7 +44,10 @@ public class EmbeddedProofProbe extends Probe { // TODO: What there are multiple proofs? com.danubetech.verifiablecredentials.VerifiableCredential vc = com.danubetech.verifiablecredentials.VerifiableCredential.fromJson(new StringReader(crd.getJson().toString())); - vc.setDocumentLoader(new CachingDocumentLoader()); + ConfigurableDocumentLoader documentLoader = new ConfigurableDocumentLoader(); + documentLoader.setEnableHttp(true); + documentLoader.setEnableHttps(true); + vc.setDocumentLoader(documentLoader); LdProof proof = vc.getLdProof(); if (proof == null) { From e44622278492911b074840f991ac597cf5c3c5b4 Mon Sep 17 00:00:00 2001 From: "Andy Miller (IMS)" <48326098+amiller-ims@users.noreply.github.com> Date: Thu, 29 Dec 2022 13:27:26 -0800 Subject: [PATCH 2/2] Add a test of a mildly complex CLR --- inspector-vc/src/test/java/org/oneedtech/inspect/vc/Samples.java | 1 + 1 file changed, 1 insertion(+) diff --git a/inspector-vc/src/test/java/org/oneedtech/inspect/vc/Samples.java b/inspector-vc/src/test/java/org/oneedtech/inspect/vc/Samples.java index 2efd81c..b484f56 100644 --- a/inspector-vc/src/test/java/org/oneedtech/inspect/vc/Samples.java +++ b/inspector-vc/src/test/java/org/oneedtech/inspect/vc/Samples.java @@ -40,6 +40,7 @@ public class Samples { public final static Sample SIMPLE_JSON = new Sample("clr20/simple.json", true); public final static Sample SIMPLE_JSON_NOPROOF = new Sample("clr20/simple-noproof.json", true); public final static Sample SIMPLE_JWT = new Sample("clr20/simple.jwt", true); + public final static Sample COMPLEX_JSON = new Sample("clr20/complex.json", true); } }