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: didexchange manager not checking the did-rotate content correctly #3057

Merged
merged 3 commits into from
Jun 24, 2024
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
4 changes: 2 additions & 2 deletions aries_cloudagent/protocols/didexchange/v1_0/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,10 +973,10 @@ async def accept_response(
signed_did = await self.verify_rotate(
wallet, response.did_rotate_attach, conn_rec.invitation_key
)
if their_did != response.did:
if their_did != signed_did:
raise DIDXManagerError(
f"Connection DID {their_did} "
f"does not match singed DID rotate {signed_did}"
f"does not match signed DID rotate {signed_did}"
)

self._logger.debug(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2014,6 +2014,9 @@ async def test_accept_response_find_by_thread_id_no_did_doc_attached(self):
mock_response.did = TestConfig.test_target_did
mock_response.did_doc_attach = None
mock_response.did_rotate_attach.data.verify = mock.AsyncMock(return_value=True)
mock_response.did_rotate_attach.data.signed = (
TestConfig.test_target_did.encode()
)

receipt = MessageReceipt(
recipient_did=TestConfig.test_did,
Expand Down
Loading