Add encryption

- actually encrypt the body of a mail
This commit is contained in:
Malte Meiboom
2025-12-17 11:11:28 +01:00
parent 64312da01d
commit eeda63f5ab
4 changed files with 55 additions and 7 deletions
+3 -1
View File
@@ -11,5 +11,7 @@ pub enum HuskError {
#[error("Cannot find local trust root")]
NoLocalTrustRoot,
#[error("Cannot access cert store")]
NoCertStore
NoCertStore,
#[error("No encryption keys found")]
NoEncryptionKeys,
}
+2 -2
View File
@@ -23,7 +23,7 @@ pub struct MailContext<'mc> {
pub recipients: Vec<Recipient<'mc>>,
// header
body: Vec<Bytes>,
pub body_size: usize,
pub body_size: usize,
}
impl<'mc> MailContext<'mc> {
@@ -46,7 +46,7 @@ impl<'mc> MailContext<'mc> {
recipient.certs = certs;
self.recipients.push(recipient);
Ok(())
}