summaryrefslogtreecommitdiffstats
path: root/crypt-mod-pgp-gpgme.c
diff options
context:
space:
mode:
authorBrendan Cully <brendan@kublai.com>2015-01-31 11:21:52 -0800
committerBrendan Cully <brendan@kublai.com>2015-01-31 11:21:52 -0800
commit738b59a75491fd1c8f70e68b0898977f034ca21f (patch)
tree0e57cc2550d11faca94f46493b2a0a8e9b52d689 /crypt-mod-pgp-gpgme.c
parentf83d12a03e50728c5a249439c17fb2cfbabc6d43 (diff)
gpgme: guard mail-key on presence of gpgme_op_export_keys
This function is too new to be assumed present.
Diffstat (limited to 'crypt-mod-pgp-gpgme.c')
-rw-r--r--crypt-mod-pgp-gpgme.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypt-mod-pgp-gpgme.c b/crypt-mod-pgp-gpgme.c
index 1dced503..2b41fbcc 100644
--- a/crypt-mod-pgp-gpgme.c
+++ b/crypt-mod-pgp-gpgme.c
@@ -95,10 +95,12 @@ static BODY *crypt_mod_pgp_encrypt_message (BODY *a, char *keylist, int sign)
return pgp_gpgme_encrypt_message (a, keylist, sign);
}
+#ifdef HAVE_GPGPME_OP_EXPORT_KEYS
static BODY *crypt_mod_pgp_make_key_attachment (char *tempf)
{
return pgp_gpgme_make_key_attachment (tempf);
}
+#endif
static void crypt_mod_pgp_set_sender (const char *sender)
{
@@ -123,7 +125,11 @@ struct crypt_module_specs crypt_mod_pgp_gpgme =
/* PGP specific. */
crypt_mod_pgp_encrypt_message,
+#ifdef HAVE_GPGME_OP_EXPORT_KEYS
crypt_mod_pgp_make_key_attachment,
+#else
+ NULL,
+#endif
crypt_mod_pgp_check_traditional,
NULL, /* pgp_traditional_encryptsign */
NULL, /* pgp_invoke_getkeys */