Skip to content
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
1 change: 1 addition & 0 deletions didcomm_messaging/crypto/backend/askar.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ async def ecdh_1pu_encrypt(
builder.set_protected(
OrderedDict(
[
("typ", "application/didcomm+encrypted"),
("alg", alg_id),
("enc", enc_id),
("apu", b64url(apu)),
Expand Down
8 changes: 6 additions & 2 deletions didcomm_messaging/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ async def prepare_forward(

# Grab our target to pack the initial message to, then pack the message
# for the DID target
next_target = chain.pop(0)["did"]
final_destination = chain.pop(0)
next_target = final_destination["did"]
packed_message = encoded_message

# Loop through the entire services chain and pack the message for each
Expand All @@ -130,4 +131,7 @@ async def prepare_forward(

# Return the forward-packed message as well as the last service in the
# chain, which is the destination of the top-level forward message.
return (packed_message, chain[-1]["service"])
service = final_destination["service"]
if len(chain):
service = chain[-1]["service"]
return (packed_message, service)
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ ignore = [

line-length = 90

extend-exclude = ["example*.py"]

[tool.ruff.per-file-ignores]
"**/{tests}/*" = ["F841", "D", "E501"]

Expand Down