Skip to content

Commit

Permalink
Merge pull request #3057 from anonyome/gm/fix-did-exch-rotate-check
Browse files Browse the repository at this point in the history
fix: didexchange manager not checking the did-rotate content correctly
  • Loading branch information
dbluhm authored Jun 24, 2024
2 parents a4ad003 + dcded32 commit 594d642
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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

0 comments on commit 594d642

Please sign in to comment.