-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
DKIM body hash with fails with trailing line with space #187
Comments
If you find any more of these, could you provide a unit test? It would make it easier to illustrate the issue. It took me a while to figure out what you meant by whitespace at the end. I think I figured it out, but I'm still not 100% sure I understand you correctly. |
Sure, will try to do unit tests as I get more familiar with the library. Just to provide some clarification: However, the following verifies just fine: |
I've released MimeKit 1.2.15 to nuget.org with a fix for this. |
When signing a message with a body having a trailing line with only a WSP (space or tab) in it with body DkimCanonicalizationAlgorithm.Relaxed algorithm, DKIM verification fails as "body hash did not verify" (tested at gmail).
I'm guessing since it's a blank line with space at the end of the message, the canonicalization algorithm is not removing what should now be an additional CRLF at the end of the message with no spaces as part of step b. at https://tools.ietf.org/html/rfc6376#section-3.4.4.
(Github won't show the extra space on the second line of the code example so you'll need to add it)
The text was updated successfully, but these errors were encountered: