Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backport): report presentation result #2622

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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