Commit Graph
15 Commits
Author SHA1 Message Date
Wez Furlong 30b8522873 dkim: precompile list of headers to sign during signing
We can exploit eg: knowing that the list of headers is a unique
list (no repeated headers) and save some overhead when using the
same signer multiple times.
2023-06-15 15:18:17 -07:00
Wez Furlong 4805f60837 dkim: avoid allocating a vec when signing headers 2023-06-15 14:45:40 -07:00
Wez Furlong 02d1378495 dkim: avoid re-parsing header list during signing 2023-06-15 14:28:11 -07:00
Wez Furlong e5d03052be dkim: tidy up handling of l= body length tag
We should parse at the edge and pass down the parsed number
2023-06-15 13:23:44 -07:00
Wez Furlong cf11540f84 dkim: remove another extraneous allocation, tidy up canon interface 2023-06-15 13:13:28 -07:00
Wez Furlong 28f0786e42 dkim: update crate deps 2023-06-15 11:37:59 -07:00
Wez Furlong 19c9201e44 dkim: remove some redundant clone calls 2023-06-15 11:30:44 -07:00
Wez Furlong 2e40c00121 dkim: introduce ParsedEmail type
This help transitions to a cheaper email parser, that doesn't need to
parse the entire MIME structure

Note that as part of this, I found that several tests were running
against email messages using unix line endings instead of canonical
CRLF.

This was silently being masked and an empty or otherwise incorrect byte
slice was being hashed; I've updated the affected tests and their test
expectations accordingly, as well as made this error bubble up at the
time of parsing the email, rather than silently squashing it in the
depths of the hasher.
2023-06-15 11:27:03 -07:00
Wez Furlong 3af3f52f66 dkim: pick some lint various bits 2023-06-15 10:27:33 -07:00
Wez Furlong 19aca29007 dkim: don't require moving data into verify_signature 2023-06-15 10:07:33 -07:00
Wez Furlong 424192eb5f dkim: tidy up DKIMHeader construction 2023-06-15 10:07:26 -07:00
Wez Furlong aecd187c21 dkim: remove some string copies 2023-06-15 09:53:53 -07:00
Wez Furlong ed8ccbc810 dkim: remove slog dependency 2023-06-15 09:27:28 -07:00
Wez Furlong eb44e0780e Use vendored in dkim fork 2023-06-15 09:11:34 -07:00
Wez Furlong 49c1533435 Merge in my DKIM crate fork 2023-06-15 09:10:39 -07:00