]> git.notmuchmail.org Git - notmuch/blob - util/crypto.h
gmime-cleanup: remove obsolete gpg_path configuration option and crypto contexts
[notmuch] / util / crypto.h
1 #ifndef _CRYPTO_H
2 #define _CRYPTO_H
3
4 #include <stdbool.h>
5 #include "gmime-extra.h"
6 #include "notmuch.h"
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 typedef struct _notmuch_crypto {
13     bool verify;
14     notmuch_decryption_policy_t decrypt;
15 } _notmuch_crypto_t;
16
17 GMimeObject *
18 _notmuch_crypto_decrypt (bool *attempted,
19                          notmuch_decryption_policy_t decrypt,
20                          notmuch_message_t *message,
21                          GMimeCryptoContext* crypto_ctx,
22                          GMimeMultipartEncrypted *part,
23                          GMimeDecryptResult **decrypt_result,
24                          GError **err);
25
26 void
27 _notmuch_crypto_cleanup (_notmuch_crypto_t *crypto);
28
29 #ifdef __cplusplus
30 }
31 #endif
32 #endif