From d78fd34995f7237bb204d02621c4056a19ed66de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 15 Apr 2023 22:06:35 +0200 Subject: [PATCH] Canonicalize the DKIM header --- src/signature.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/signature.rs b/src/signature.rs index ea96ebc..481947c 100644 --- a/src/signature.rs +++ b/src/signature.rs @@ -71,7 +71,9 @@ impl Signature { hasher.update(&header); } } - hasher.update(self.get_header().as_bytes()); + let dkim_header = self.get_header(); + let dkim_header = self.canonicalization.process_header(dkim_header.as_bytes()); + hasher.update(dkim_header); hasher.finalize().to_vec() } }