Skip to content

Commit

Permalink
Merge pull request #2622 from dbluhm/backport/fix/presentations-resul…
Browse files Browse the repository at this point in the history
…t-verification

fix(backport): report presentation result
  • Loading branch information
swcurran authored Nov 21, 2023
2 parents 9ce2e5a + 6512f9a commit 4c45244
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down
4 changes: 2 additions & 2 deletions aries_cloudagent/vc/vc_ld/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ async def _verify_presentation(
)

credential_results = None
verified = True

credentials = JsonLdProcessor.get_values(presentation, "verifiableCredential")
credential_results = await asyncio.gather(
Expand All @@ -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,
Expand Down

0 comments on commit 4c45244

Please sign in to comment.