X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=lib%2Findex.cc;h=f21761d0c3d74133a676d082f7b1da01d3365a39;hb=b7ac4c05e118047442378f58eeb69d43bd1cbdb1;hp=0e98984c63e512a3d6f188be394ddd35e9dec3cd;hpb=f6da475e35634cd39d765e75442e5b18401b80ea;p=notmuch diff --git a/lib/index.cc b/lib/index.cc index 0e98984c..f21761d0 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -528,12 +528,11 @@ _index_encrypted_mime_part (notmuch_message_t *message, notmuch = notmuch_message_get_database (message); - GMimeCryptoContext* crypto_ctx = NULL; bool attempted = false; GMimeDecryptResult *decrypt_result = NULL; - bool get_sk = (HAVE_GMIME_SESSION_KEYS && notmuch_indexopts_get_decrypt_policy (indexopts) == NOTMUCH_DECRYPT_TRUE); + bool get_sk = (notmuch_indexopts_get_decrypt_policy (indexopts) == NOTMUCH_DECRYPT_TRUE); clear = _notmuch_crypto_decrypt (&attempted, notmuch_indexopts_get_decrypt_policy (indexopts), - message, crypto_ctx, encrypted_data, get_sk ? &decrypt_result : NULL, &err); + message, encrypted_data, get_sk ? &decrypt_result : NULL, &err); if (!attempted) return; if (err || !clear) { @@ -554,7 +553,6 @@ _index_encrypted_mime_part (notmuch_message_t *message, return; } if (decrypt_result) { -#if HAVE_GMIME_SESSION_KEYS if (get_sk) { status = notmuch_message_add_property (message, "session-key", g_mime_decrypt_result_get_session_key (decrypt_result)); @@ -562,7 +560,6 @@ _index_encrypted_mime_part (notmuch_message_t *message, _notmuch_database_log (notmuch, "failed to add session-key " "property (%d)\n", status); } -#endif g_object_unref (decrypt_result); } _index_mime_part (message, indexopts, clear); @@ -593,7 +590,6 @@ _notmuch_message_index_file (notmuch_message_t *message, addresses = g_mime_message_get_from (mime_message); if (addresses) { _index_address_list (message, "from", addresses); - g_mime_2_6_unref (addresses); } addresses = g_mime_message_get_all_recipients (mime_message);