Skip to content

Commit

Permalink
Correctly indicate no auth result in AAR
Browse files Browse the repository at this point in the history
It is not valid to have no authentication results; if no message
authentication was performed the special value no-result
(`[CFWS] ";" [CFWS] "none"`) should be used.

trusteddomainproject#174
  • Loading branch information
flowerysong authored and futatuki committed Oct 3, 2024
1 parent ef5a6d0 commit 4c0d4a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libopenarc/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3213,8 +3213,12 @@ arc_getseal(ARC_MESSAGE *msg, ARC_HDRFIELD **seal, char *authservid,
arc_dstring_printf(dstr, "ARC-Authentication-Results:i=%u; %s",
msg->arc_nsets + 1,
msg->arc_authservid);
if (ar != NULL)
if (ar == NULL) {
/* no-result per RFC 8601 2.2 */
arc_dstring_printf(dstr, "; none");
} else {
arc_dstring_printf(dstr, "; %s", (char *) ar);
}

status = arc_parse_header_field(msg, arc_dstring_get(dstr),
arc_dstring_len(dstr), &h);
Expand Down

0 comments on commit 4c0d4a4

Please sign in to comment.