From 1b8baa9a22ae349a5fa88f98379647ee131207a5 Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Mon, 20 Nov 2023 13:19:06 -0500 Subject: [PATCH 1/2] fix: report presentation result Signed-off-by: Daniel Bluhm --- aries_cloudagent/vc/vc_ld/verify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/vc/vc_ld/verify.py b/aries_cloudagent/vc/vc_ld/verify.py index d589dd23c5..1397bf312d 100644 --- a/aries_cloudagent/vc/vc_ld/verify.py +++ b/aries_cloudagent/vc/vc_ld/verify.py @@ -111,7 +111,6 @@ async def _verify_presentation( ) credential_results = None - verified = True credentials = JsonLdProcessor.get_values(presentation, "verifiableCredential") credential_results = await asyncio.gather( @@ -129,7 +128,8 @@ async def _verify_presentation( ] ) - verified = all([result.verified for result in credential_results]) + credentials_verified = all(result.verified for result in credential_results) + verified = credentials_verified and presentation_result.verified return PresentationVerificationResult( verified=verified, From 6512f9ac92caada3209850bf9bd7e3293fe12393 Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Tue, 21 Nov 2023 00:23:08 -0500 Subject: [PATCH 2/2] fix: challenge from request always Signed-off-by: Daniel Bluhm --- .../protocols/present_proof/v2_0/formats/dif/handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py b/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py index 8291a0e3fa..d158150b60 100644 --- a/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py +++ b/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py @@ -190,13 +190,13 @@ async def create_pres( limit_record_ids = pres_spec_payload.get("record_ids") reveal_doc_frame = pres_spec_payload.get("reveal_doc") if not pres_definition: - if "options" in proof_request: - challenge = proof_request["options"].get("challenge") - domain = proof_request["options"].get("domain") pres_definition = PresentationDefinition.deserialize( proof_request.get("presentation_definition") ) issuer_id = None + if "options" in proof_request: + challenge = proof_request["options"].get("challenge") + domain = proof_request["options"].get("domain") if not challenge: challenge = str(uuid4())