]> git.notmuchmail.org Git - notmuch/blob - util/crypto.h
80628dc528d258057561a37168d116437fa2d75c
[notmuch] / util / crypto.h
1 #ifndef _CRYPTO_H
2 #define _CRYPTO_H
3
4 #include <stdbool.h>
5 #if (GMIME_MAJOR_VERSION < 3)
6 #include "gmime-extra.h"
7 #endif
8
9 typedef struct _notmuch_crypto {
10     bool verify;
11     bool decrypt;
12 #if (GMIME_MAJOR_VERSION < 3)
13     GMimeCryptoContext* gpgctx;
14     GMimeCryptoContext* pkcs7ctx;
15     const char *gpgpath;
16 #endif
17 } _notmuch_crypto_t;
18
19
20 #if (GMIME_MAJOR_VERSION < 3)
21 GMimeCryptoContext *
22 _notmuch_crypto_get_gmime_context (_notmuch_crypto_t *crypto, const char *protocol);
23 #endif
24
25 void
26 _notmuch_crypto_cleanup (_notmuch_crypto_t *crypto);
27
28 #endif