From 96d2a7f0bfb26d36a03975306b4ca7a4acbad5af Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 4 Nov 2022 18:57:18 +0000 Subject: [PATCH] Assert that encryption preference is still mutual --- src/authres.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/authres.rs b/src/authres.rs index 55a3dc636..51f7eb9fa 100644 --- a/src/authres.rs +++ b/src/authres.rs @@ -357,6 +357,7 @@ mod tests { use super::*; + use crate::aheader::EncryptPreference; use crate::e2ee; use crate::mimeparser; use crate::peerstate::Peerstate; @@ -686,6 +687,9 @@ Authentication-Results: box.hispanilandia.net; spf=pass smtp.mailfrom=adbenitez@ .await? .unwrap(); + // Encryption preference is still mutual. + assert_eq!(bob_state.prefer_encrypt, EncryptPreference::Mutual); + // Also check that the keypair was not changed assert_eq!( bob_state.public_key.unwrap(),