Third version of this series [0]. I've made some changes in this version: * added a new crypto.c that holds two functions: one to return a context for a specified crypto protocol (and initialize it if needed), and another to cleanup a crypto struct. This is introduced in the first patch, and makes the rest of the patches a little cleaner. * Based on Jani's and Daniel's suggestion, I decided to leave the notmuch_show_params_t in notmuch-reply.c, since we might need it later and it's less changes here. Otherwise everything else is the same. I think the version is nicer that the previous ones. FWIW I also now have S/MIME support working based on this patch series. Daniel has kindly agreed to put together some tests for that, so once this series is accepted and Daniel's tests are sent, I'll send on the rest of the S/MIME support (which is actually just one small patch on top of this series). jamie. [0] id:"1337205359-2444-1-git-send-email-jrollins@finestructure.net" id:"1337362357-31281-1-git-send-email-jrollins@finestructure.net"