Skip to content

Commit

Permalink
libopenarc: remove "c" from the list of required tags
Browse files Browse the repository at this point in the history
c= Message canonicalization (plain-text; OPTIONAL, default is
    "simple/simple").
  • Loading branch information
flowerysong committed Nov 11, 2024
1 parent b4189e6 commit bb2dc58
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.

### Fixed
- libopenarc - `arc_free()` accepts NULL.
- libopenarc - `c` is not a required tag in `ARC-Message-Signature`.

## [1.1.0](https://github.com/flowerysong/OpenARC/releases/tag/v1.1.0) - 2024-11-05

Expand Down
8 changes: 4 additions & 4 deletions libopenarc/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,10 @@ arc_genamshdr(ARC_MESSAGE *msg,
arc_dstring_printf(dstr, ";%scv=%s", delim,
arc_code_to_name(chainstatus, msg->arc_cstate));
}
else
else if (msg->arc_canonhdr != ARC_CANON_SIMPLE ||
msg->arc_canonbody != ARC_CANON_SIMPLE)
{
/* c= */
/* Add c= for the AMS if it's not the RFC default simple/simple */
arc_dstring_printf(
dstr, ";%sc=%s/%s", delim,
arc_code_to_name(canonicalizations, msg->arc_canonhdr),
Expand Down Expand Up @@ -1686,8 +1687,7 @@ arc_process_set(ARC_MESSAGE *msg,
arc_param_get(set, "d") == NULL ||
arc_param_get(set, "b") == NULL ||
arc_param_get(set, "bh") == NULL ||
arc_param_get(set, "i") == NULL ||
arc_param_get(set, "c") == NULL || arc_param_get(set, "a") == NULL)
arc_param_get(set, "i") == NULL || arc_param_get(set, "a") == NULL)
{
arc_error(msg, "missing parameter(s) in %s data", settype);
set->set_bad = true;
Expand Down
2 changes: 1 addition & 1 deletion test/test_milter.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_milter_staticmsg(run_miltertest):
def test_milter_canon_simple(run_miltertest):
"""Sign a message with simple canonicalization and then verify it"""
res = run_miltertest()
assert 'c=simple/simple' in res['headers'][1][1]
assert 'c=relaxed' not in res['headers'][1][1]

res = run_miltertest(res['headers'])
assert 'cv=pass' in res['headers'][0][1]
Expand Down

0 comments on commit bb2dc58

Please sign in to comment.