From 2e653db38fc38dee92b2ee0564e27921132e7232 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Wed, 25 May 2011 18:01:18 -0700 Subject: Add decryption of PGP/MIME-encrypted parts with --decrypt. This adds support for decrypting PGP/MIME-encrypted parts to notmuch-show and notmuch-reply. The --decrypt option implies --verify. Once decryption (and possibly signature verification) is done, a new part_encstatus formatter is emitted, the part_sigstatus formatter is emitted, and the entire multipart/encrypted part is replaced by the contents of the encrypted part. At the moment only a json part_encstatus formatting function is available, even though decryption is done for all formats. Emacs support to follow. --- notmuch-client.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'notmuch-client.h') diff --git a/notmuch-client.h b/notmuch-client.h index dc4ed7aa..8a272603 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -67,6 +67,7 @@ typedef struct notmuch_show_format { const char *body_start; void (*part_start) (GMimeObject *part, int *part_count); + void (*part_encstatus) (int status); void (*part_sigstatus) (const GMimeSignatureValidity* validity); void (*part_content) (GMimeObject *part); void (*part_end) (GMimeObject *part); @@ -82,6 +83,7 @@ typedef struct notmuch_show_params { int raw; int part; GMimeCipherContext* cryptoctx; + int decrypt; } notmuch_show_params_t; /* There's no point in continuing when we've detected that we've done -- cgit v1.2.3