@bedrock/vc-verifier 22.1.1 → 22.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/verify.js +7 -3
- package/package.json +1 -1
package/lib/verify.js
CHANGED
|
@@ -36,9 +36,13 @@ export async function verifyPresentation({
|
|
|
36
36
|
const result = await di.verifyPresentation({
|
|
37
37
|
config, presentation, challenge, domain, checks
|
|
38
38
|
});
|
|
39
|
-
if
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
// if the whole VP and all its VCs were verified or if the VP itself
|
|
40
|
+
// was checked and it failed verification, there is no extra work to be
|
|
41
|
+
// done and we can return early; it is important to note that the
|
|
42
|
+
// presence of `presentationResult` must be confirmed here to ensure that
|
|
43
|
+
// if an unprotected presentation was used and this was allowed, the VC
|
|
44
|
+
// checks will continue below
|
|
45
|
+
if(result.verified || result.presentationResult?.verified === false) {
|
|
42
46
|
return result;
|
|
43
47
|
}
|
|
44
48
|
|