From f2d567fbd5381d4f5329fe9c5cbed0a63cced711 Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Mon, 29 Jan 2024 19:43:12 -0500 Subject: [PATCH] fix: accept and emit didexchange/1.1 when appropriate Signed-off-by: Daniel Bluhm --- aries_cloudagent/messaging/responder.py | 3 +++ aries_cloudagent/protocols/didexchange/definition.py | 2 +- .../protocols/didexchange/v1_0/message_types.py | 7 ++++++- .../protocols/out_of_band/v1_0/messages/invitation.py | 11 ++++++++++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/aries_cloudagent/messaging/responder.py b/aries_cloudagent/messaging/responder.py index 12f0d3256f..6c41393ee2 100644 --- a/aries_cloudagent/messaging/responder.py +++ b/aries_cloudagent/messaging/responder.py @@ -19,6 +19,9 @@ from .base_message import BaseMessage SKIP_ACTIVE_CONN_CHECK_MSG_TYPES = [ + "didexchange/1.1/request", + "didexchange/1.1/response", + "didexchange/1.1/problem_report", "didexchange/1.0/request", "didexchange/1.0/response", "didexchange/1.0/problem_report", diff --git a/aries_cloudagent/protocols/didexchange/definition.py b/aries_cloudagent/protocols/didexchange/definition.py index 62bddef6f5..13c1f8a8ef 100644 --- a/aries_cloudagent/protocols/didexchange/definition.py +++ b/aries_cloudagent/protocols/didexchange/definition.py @@ -4,7 +4,7 @@ { "major_version": 1, "minimum_minor_version": 0, - "current_minor_version": 0, + "current_minor_version": 1, "path": "v1_0", } ] diff --git a/aries_cloudagent/protocols/didexchange/v1_0/message_types.py b/aries_cloudagent/protocols/didexchange/v1_0/message_types.py index ecb038e1f4..2cb9ff53af 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/message_types.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/message_types.py @@ -1,12 +1,17 @@ """Message type identifiers for Connections.""" +from ....core.util import get_proto_default_version from ...didcomm_prefix import DIDCommPrefix SPEC_URI = ( "https://github.com/hyperledger/aries-rfcs/tree/" "25464a5c8f8a17b14edaa4310393df6094ace7b0/features/0023-did-exchange" ) -ARIES_PROTOCOL = "didexchange/1.0" +# Default Version +DEFAULT_VERSION = get_proto_default_version( + "aries_cloudagent.protocols.didexchange.definition", 1 +) +ARIES_PROTOCOL = f"didexchange/{DEFAULT_VERSION}" # Message types DIDX_REQUEST = f"{ARIES_PROTOCOL}/request" diff --git a/aries_cloudagent/protocols/out_of_band/v1_0/messages/invitation.py b/aries_cloudagent/protocols/out_of_band/v1_0/messages/invitation.py index 09a2dfe19e..af515a259d 100644 --- a/aries_cloudagent/protocols/out_of_band/v1_0/messages/invitation.py +++ b/aries_cloudagent/protocols/out_of_band/v1_0/messages/invitation.py @@ -35,7 +35,16 @@ class HSProto(Enum): RFC23 = HSProtoSpec( 23, DIDX_PROTO, - {"didexchange", "didx", "didex", "rfc23", "23", "new"}, + { + "https://didcomm.org/didexchange/1.0", + "didexchange/1.0", + "didexchange", + "didx", + "didex", + "rfc23", + "23", + "new", + }, ) @classmethod