feat: Add Config::StdHeaderProtectionComposing (enables composing as defined in RFC 9788) (#7130)

And enable it by default as the standard Header Protection is backward-compatible.

Also this tests extra IMF header removal when a message has standard Header Protection since now we
can send such messages.
This commit is contained in:
iequidoo
2025-10-28 15:36:08 -03:00
committed by iequidoo
parent e2ae6ae013
commit c6894f56b2
5 changed files with 66 additions and 16 deletions

View File

@@ -445,6 +445,12 @@ pub enum Config {
/// Return an error from `receive_imf_inner()` for a fully downloaded message. For tests.
FailOnReceivingFullMsg,
/// Enable composing emails with Header Protection as defined in
/// <https://www.rfc-editor.org/rfc/rfc9788.html> "Header Protection for Cryptographically
/// Protected Email".
#[strum(props(default = "1"))]
StdHeaderProtectionComposing,
}
impl Config {