Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure received emails with no chain are signed correctly #170

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions libopenarc/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3056,6 +3056,14 @@ arc_set_cv(ARC_MESSAGE *msg, ARC_CHAIN cv)
cv == ARC_CHAIN_FAIL ||
cv == ARC_CHAIN_PASS);

/* If the chain was none (i.e. the verified email had now chain), but
* it now has a chain, then assume that we added the valid chain and
* that therefore the chain state should now be pass instead. Otherwise
* the newly-signed chain will have a status of none, even though it
* should be the valid chain that we added. */
if ((cv == ARC_CHAIN_NONE) && (msg->arc_nsets != 0))
cv = ARC_CHAIN_PASS;

msg->arc_cstate = cv;
}

Expand Down