From e73921232f5cdf4c1a74597f699ae4119bba9cb6 Mon Sep 17 00:00:00 2001 From: "Andy Miller (IMS)" <48326098+amiller-ims@users.noreply.github.com> Date: Thu, 10 Nov 2022 12:18:26 -0800 Subject: [PATCH] Switch to configurable document loader --- .../oneedtech/inspect/vc/probe/EmbeddedProofProbe.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 554a0cf..ef524c8 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 @@ -8,13 +8,13 @@ import org.oneedtech.inspect.core.probe.Probe; import org.oneedtech.inspect.core.probe.RunContext; import org.oneedtech.inspect.core.report.ReportItems; import org.oneedtech.inspect.vc.Credential; -import org.oneedtech.inspect.vc.util.CachingDocumentLoader; import com.apicatalog.ld.DocumentError; import com.apicatalog.multibase.Multibase; import com.apicatalog.vc.processor.StatusVerifier; import com.danubetech.verifiablecredentials.VerifiableCredential; +import foundation.identity.jsonld.ConfigurableDocumentLoader; import info.weboftrust.ldsignatures.verifier.Ed25519Signature2020LdVerifier; /** @@ -38,8 +38,10 @@ public class EmbeddedProofProbe extends Probe { //TODO check value "proofPurpose": "assertionMethod", if not error VerifiableCredential vc = VerifiableCredential.fromJson(new StringReader(crd.getJson().toString())); - vc.setDocumentLoader(new CachingDocumentLoader()); - + ConfigurableDocumentLoader documentLoader = new ConfigurableDocumentLoader(); + documentLoader.setEnableHttp(true); + documentLoader.setEnableHttps(true); + vc.setDocumentLoader(documentLoader); URI method = vc.getLdProof().getVerificationMethod(); // The verification method must dereference to an Ed25519VerificationKey2020.