-
Notifications
You must be signed in to change notification settings - Fork 2
Add ARC verification #7
Conversation
dmotylev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of suggestions regarding naming, which might add some clarity w/o much documenting
Co-authored-by: Dmitry Motylev <[email protected]>
Co-authored-by: Dmitry Motylev <[email protected]>
0c9c163 to
c34228c
Compare
jpicht
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor things, looks good otherwise.
arc.go
Outdated
| amsKey = "ARC-Message-signature" | ||
| aarKey = "ARC-Authentication-Results" | ||
|
|
||
| errMissingArcFields = errors.New("missing arc fields") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't errors be public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| } | ||
| // if "c=" not given, use relaxed | ||
| if !ams.canonicalization { | ||
| ams.RelaxedHeader = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this always be true already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On as, yes. The ams is the result of parseSignature(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea on AS, on the AMS header sometimes the cannonization field is not provided, so we just want a default here.
arc_test.go
Outdated
|
|
||
| for testName, test := range doc.Tests { | ||
| t.Run(fmt.Sprintf("%s", testName), func(t *testing.T) { | ||
| //if testName != "ams_fields_c_sr" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dead code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
dkim.go
Outdated
| // Only used for arc, so only contains the used result codes | ||
| // https://www.rfc-editor.org/rfc/rfc8617.html#section-4.4 | ||
| func extractResultCode(value string) ResultCode { | ||
| //todo: check if we need this bit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was an old comment, removed
c223a0f to
aa8f3a7
Compare
470ed66 to
c4cccf1
Compare
https://www.rfc-editor.org/rfc/rfc8617.html