Fix the DKIM header CRLF

This commit is contained in:
Rodolphe Bréard 2023-04-15 23:13:16 +02:00
parent 614bc13bf3
commit 4f1651874f

View file

@ -71,8 +71,10 @@ impl Signature {
hasher.update(&header);
}
}
let dkim_header = self.get_header();
let dkim_header = self.canonicalization.process_header(dkim_header.as_bytes());
let dkim_header = format!("{}\r\n", self.get_header());
let mut dkim_header = self.canonicalization.process_header(dkim_header.as_bytes());
dkim_header.pop();
dkim_header.pop();
hasher.update(dkim_header);
hasher.finalize().to_vec()
}