From d07ee807397ca4ee652ccaf59e40907aa548e0bc Mon Sep 17 00:00:00 2001 From: F-Node-Karlsruhe Date: Tue, 14 Nov 2023 09:26:24 +0100 Subject: [PATCH] make manual status check for sd credentials Signed-off-by: F-Node-Karlsruhe --- CHANGELOG.md | 1 + api/src/services/verifier/index.ts | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2e852c..633f919 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ WIP --- - introduce static contexts +- manual status checks for SD credentials 1.7.4 (2023-10-10) diff --git a/api/src/services/verifier/index.ts b/api/src/services/verifier/index.ts index 15e5304..ebb5677 100644 --- a/api/src/services/verifier/index.ts +++ b/api/src/services/verifier/index.ts @@ -118,11 +118,24 @@ export class Verifier { result = await jsigs.verify(credential, { suite, purpose: new AssertionProofPurpose(), - documentLoader, - // give it to jsigs anyway - does not get verified - checkStatus + documentLoader }); + // make manual status as long as not implemented in jsigs + if (checkStatus) { + result.statusResult = await checkStatus({ + credential, + documentLoader, + suite, + verifyStatusListCredential: true, + verifyMatchingIssuers: false + }); + if (!result.statusResult.verified) { + result.verified = false; + } + } + + } else { result = await verifyCredential({ credential, suite, documentLoader, checkStatus });