aboutsummaryrefslogtreecommitdiff
path: root/util/crypto.h
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2019-05-26 18:15:55 -0400
committerDavid Bremner <david@tethera.net>2019-05-29 08:02:45 -0300
commita6b0772b60d9191fcc291358eec3d78bfea31f1c (patch)
treeecaecc73958232fb50fd30dae97dc59afbe2a5ca /util/crypto.h
parent80728a95e6fd8bd1c4a4f8dd8040984ab5c4b04a (diff)
util/crypto: add information about the payload part
When walking the MIME tree, if we discover that we are at the cryptographic payload, then we would like to record at least the Subject header of the current MIME part. In the future, we might want to record many other headers as well, but for now we will stick with just the Subject. See https://dkg.fifthhorseman.net/blog/e-mail-cryptography.html#cryptographic-envelope for more description of the Cryptographic Payload vs. the Cryptographic Envelope. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'util/crypto.h')
-rw-r--r--util/crypto.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/crypto.h b/util/crypto.h
index c6fa7f4b..fdbb5da5 100644
--- a/util/crypto.h
+++ b/util/crypto.h
@@ -59,6 +59,11 @@ typedef struct _notmuch_message_crypto {
* is not part of the cryptographic envelope) */
bool payload_encountered;
+ /* the value of any "Subject:" header in the cryptographic payload
+ * (the top level part within the crypto envelope), converted to
+ * UTF-8 */
+ char * payload_subject;
+
/* if both signed and encrypted, was the signature encrypted? */
bool signature_encrypted;
} _notmuch_message_crypto_t;