Skip to content

Commit

Permalink
Merge branch 'main' into fix/ProblemReportBeforeConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
dbluhm authored Sep 27, 2023
2 parents 7283b43 + 10e211f commit 2556f49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 8 additions & 6 deletions aries_cloudagent/config/argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,8 @@ def add_arguments(self, parser: ArgumentParser):
help=(
"Emit protocol messages with new DIDComm prefix; i.e., "
"'https://didcomm.org/' instead of (default) prefix "
"'did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/'."
"'did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/'. "
"Forced to `true` as the old prefix must never be used."
),
)
parser.add_argument(
Expand All @@ -1217,7 +1218,8 @@ def add_arguments(self, parser: ArgumentParser):
help=(
"Send packed agent messages with the DIDComm MIME type "
"as of RFC 0044; i.e., 'application/didcomm-envelope-enc' "
"instead of 'application/ssi-agent-wire'."
"instead of 'application/ssi-agent-wire'. "
"Forced to `true` as the old MIME type must never be used."
),
)
parser.add_argument(
Expand Down Expand Up @@ -1288,10 +1290,10 @@ def get_settings(self, args: Namespace) -> dict:
raise ArgsParseError("Error writing trace event " + str(e))
if args.preserve_exchange_records:
settings["preserve_exchange_records"] = True
if args.emit_new_didcomm_prefix:
settings["emit_new_didcomm_prefix"] = True
if args.emit_new_didcomm_mime_type:
settings["emit_new_didcomm_mime_type"] = True
# NOT setting the following two parameters `True` is no longer supported
# Even if the args are not set, the config setting is True.
settings["emit_new_didcomm_prefix"] = True
settings["emit_new_didcomm_mime_type"] = True
if args.exch_use_unencrypted_tags:
settings["exch_use_unencrypted_tags"] = True
environ["EXCH_UNENCRYPTED_TAGS"] = "True"
Expand Down
2 changes: 2 additions & 0 deletions aries_cloudagent/protocols/tests/test_didcomm_prefix.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def test_didcomm_prefix(self):
f"{DIDCommPrefix.NEW.value}/hello"
)

# No longer possible to have the arg `False` but leaving in test
# Still want to be able to receive the OLD format, just not emit it
DIDCommPrefix.set({"emit_new_didcomm_prefix": False})
assert environ.get("DIDCOMM_PREFIX") == DIDCommPrefix.OLD.value
assert DIDCommPrefix.qualify_current("hello") == (
Expand Down

0 comments on commit 2556f49

Please sign in to comment.