From 5a49e97f38fcf98b11354bb139b0c31cac9af226 Mon Sep 17 00:00:00 2001 From: George Mulhearn Date: Mon, 24 Jun 2024 11:38:19 +1000 Subject: [PATCH 1/3] fix Signed-off-by: George Mulhearn --- aries_cloudagent/protocols/didexchange/v1_0/manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/protocols/didexchange/v1_0/manager.py b/aries_cloudagent/protocols/didexchange/v1_0/manager.py index 2b5f9b984e..815e277cc4 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/manager.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/manager.py @@ -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( From 162927b2d5f38a005c6481f70793e83ec63bfa81 Mon Sep 17 00:00:00 2001 From: George Mulhearn Date: Mon, 24 Jun 2024 11:50:55 +1000 Subject: [PATCH 2/3] try fix test Signed-off-by: George Mulhearn --- .../protocols/didexchange/v1_0/tests/test_manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py b/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py index 405f912a35..469943826a 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py @@ -2014,6 +2014,7 @@ 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, From dcded320b7b1bebdc3b1e46ee71a2b6427e10c2c Mon Sep 17 00:00:00 2001 From: George Mulhearn Date: Mon, 24 Jun 2024 12:14:01 +1000 Subject: [PATCH 3/3] lint Signed-off-by: George Mulhearn --- .../protocols/didexchange/v1_0/tests/test_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py b/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py index 469943826a..bb9ab8d05c 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py @@ -2014,7 +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() + mock_response.did_rotate_attach.data.signed = ( + TestConfig.test_target_did.encode() + ) receipt = MessageReceipt( recipient_did=TestConfig.test_did,