diff options
author | Jameson Graef Rollins <jrollins@finestructure.net> | 2011-05-25 18:01:17 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2011-05-27 16:22:00 -0700 |
commit | 8b18efe171ef80cbb238a9446137c39908755d2d (patch) | |
tree | 68f344312f9c55057b1541d2acf2ce43bfd89054 /notmuch-gmime-session.c | |
parent | 627d752501b42326b9016271de33a6cb0fa2dc8c (diff) |
Add signature verification of PGP/MIME-signed parts with --verify.
This is primarily for notmuch-show, although the functionality is
added to show-message. Once signatures are processed a new
part_sigstatus formatter is emitted, and the entire multipart/signed
part is replaced with the contents of the signed part.
At the moment only a json part_sigstatus formatting function is
available. Emacs support to follow.
The original work for this patch was done by
Daniel Kahn Gillmor <dkg@fifthhorseman.net>
whose help with this functionality I greatly appreciate.
Diffstat (limited to 'notmuch-gmime-session.c')
-rw-r--r-- | notmuch-gmime-session.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/notmuch-gmime-session.c b/notmuch-gmime-session.c new file mode 100644 index 00000000..d83d9b3d --- /dev/null +++ b/notmuch-gmime-session.c @@ -0,0 +1,49 @@ +#include "notmuch-client.h" + +/* CRUFTY BOILERPLATE for GMimeSession (dkg thinks this will go away once GMime 2.6 comes out) */ +typedef struct _NotmuchGmimeSession NotmuchGmimeSession; +typedef struct _NotmuchGmimeSessionClass NotmuchGmimeSessionClass; + +struct _NotmuchGmimeSession { + GMimeSession parent_object; +}; + +struct _NotmuchGmimeSessionClass { + GMimeSessionClass parent_class; +}; + +static void notmuch_gmime_session_class_init (NotmuchGmimeSessionClass *klass); + +static GMimeSessionClass *parent_class = NULL; + +GType +notmuch_gmime_session_get_type (void) +{ + static GType type = 0; + + if (!type) { + static const GTypeInfo info = { + sizeof (NotmuchGmimeSessionClass), + NULL, /* base_class_init */ + NULL, /* base_class_finalize */ + (GClassInitFunc) notmuch_gmime_session_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (NotmuchGmimeSession), + 0, /* n_preallocs */ + NULL, /* object_init */ + NULL, /* value_table */ + }; + type = g_type_register_static (GMIME_TYPE_SESSION, "NotmuchGmimeSession", &info, 0); + } + return type; +} + +static void +notmuch_gmime_session_class_init (NotmuchGmimeSessionClass *klass) +{ + GMimeSessionClass *session_class = GMIME_SESSION_CLASS (klass); + parent_class = g_type_class_ref (GMIME_TYPE_SESSION); + session_class->request_passwd = NULL; +} +/* END CRUFTY BOILERPLATE */ |