-#if (GMIME_MAJOR_VERSION < 3)
-/* Create or pass on a GPG context (GMime 2.6) */
-static notmuch_status_t
-get_gpg_context (_notmuch_crypto_t *crypto, GMimeCryptoContext **ctx)
-{
- if (ctx == NULL || crypto == NULL)
- return NOTMUCH_STATUS_NULL_POINTER;
-
- if (crypto->gpgctx) {
- *ctx = crypto->gpgctx;
- return NOTMUCH_STATUS_SUCCESS;
- }
-
- /* TODO: GMimePasswordRequestFunc */
- crypto->gpgctx = g_mime_gpg_context_new (NULL, crypto->gpgpath ? crypto->gpgpath : "gpg");
- if (! crypto->gpgctx) {
- return NOTMUCH_STATUS_FAILED_CRYPTO_CONTEXT_CREATION;
- }
-
- g_mime_gpg_context_set_use_agent ((GMimeGpgContext *) crypto->gpgctx, true);
- g_mime_gpg_context_set_always_trust ((GMimeGpgContext *) crypto->gpgctx, false);
-
- *ctx = crypto->gpgctx;
- return NOTMUCH_STATUS_SUCCESS;
-}
-
-/* Create or pass on a PKCS7 context (GMime 2.6) */
-static notmuch_status_t
-get_pkcs7_context (_notmuch_crypto_t *crypto, GMimeCryptoContext **ctx)