Skip to content

Commit 1492752

Browse files
flowerysongfutatuki
authored andcommitted
Correctly indicate no auth result in AAR
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
1 parent 7990a39 commit 1492752

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libopenarc/arc.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -3272,8 +3272,12 @@ arc_getseal(ARC_MESSAGE *msg, ARC_HDRFIELD **seal, char *authservid,
32723272
arc_dstring_printf(dstr, "ARC-Authentication-Results:i=%u; %s",
32733273
msg->arc_nsets + 1,
32743274
msg->arc_authservid);
3275-
if (ar != NULL)
3275+
if (ar == NULL) {
3276+
/* no-result per RFC 8601 2.2 */
3277+
arc_dstring_printf(dstr, "; none");
3278+
} else {
32763279
arc_dstring_printf(dstr, "; %s", (char *) ar);
3280+
}
32773281

32783282
status = arc_parse_header_field(msg, arc_dstring_get(dstr),
32793283
arc_dstring_len(dstr), &h);

0 commit comments

Comments
 (0)