2017-10-17 21:09:55 +02:00
|
|
|
#ifndef _CRYPTO_H
|
|
|
|
#define _CRYPTO_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "gmime-extra.h"
|
2017-10-17 21:09:56 +02:00
|
|
|
#include "notmuch.h"
|
2017-10-17 21:09:55 +02:00
|
|
|
|
2019-03-02 21:26:06 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2017-10-17 21:09:55 +02:00
|
|
|
typedef struct _notmuch_crypto {
|
|
|
|
bool verify;
|
2017-12-08 07:23:52 +01:00
|
|
|
notmuch_decryption_policy_t decrypt;
|
2017-10-17 21:09:55 +02:00
|
|
|
} _notmuch_crypto_t;
|
|
|
|
|
2017-11-30 09:59:27 +01:00
|
|
|
GMimeObject *
|
2017-12-08 07:23:58 +01:00
|
|
|
_notmuch_crypto_decrypt (bool *attempted,
|
|
|
|
notmuch_decryption_policy_t decrypt,
|
2017-12-08 07:23:53 +01:00
|
|
|
notmuch_message_t *message,
|
2017-11-30 09:59:27 +01:00
|
|
|
GMimeMultipartEncrypted *part,
|
|
|
|
GMimeDecryptResult **decrypt_result,
|
|
|
|
GError **err);
|
2017-10-17 21:09:55 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
_notmuch_crypto_cleanup (_notmuch_crypto_t *crypto);
|
|
|
|
|
2019-03-02 21:26:06 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2017-10-17 21:09:55 +02:00
|
|
|
#endif
|