summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-12-03 08:41:53 +0100
committerKevin McCarthy <kevin@8t8.us>2018-12-04 18:58:20 -0800
commit0725e71e00e0e03a83393e752224ee3d4edcd0b3 (patch)
treeb847042d94c287c13225dc949b192113c593b5d9
parent125c955d8da8bafd7c02bf784b624bd9b0e2b235 (diff)
Require GPGME version 1.2.0 and drop useless HAVE macros.
GPGME 1.2.0 was released nearly 10 years ago and thus we can really demand this version. For various reasons it would be advisable to require a decent version but that is a different thing and needs to be done in a separate patch. HAVE_GPGME_OP_EXPORT_KEYS and HAVE_GPGME_PKA_TRUST are not anymore needed because they are supported by that GPGME version. Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r--configure.ac14
-rw-r--r--crypt-gpgme.c6
-rw-r--r--crypt-mod-pgp-classic.c2
-rw-r--r--crypt-mod-pgp-gpgme.c6
4 files changed, 3 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index d8aebe33..8ab8b0c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,22 +129,12 @@ AC_ARG_ENABLE(gpgme, AS_HELP_STRING([--enable-gpgme],[Enable GPGME support]),
if test x"$enable_gpgme" = xyes; then
AC_MSG_RESULT(yes)
- AM_PATH_GPGME(1.0.0, AC_DEFINE(CRYPT_BACKEND_GPGME, 1,
+ AM_PATH_GPGME(1.2.0, AC_DEFINE(CRYPT_BACKEND_GPGME, 1,
[Defined, if GPGME support is enabled]),
[gpgme_found=no])
if test x"$gpgme_found" = xno; then
- AC_MSG_ERROR([*** GPGME not found ***])
+ AC_MSG_ERROR([*** GPGME not found or version is older than 1.2 ***])
else
- AM_PATH_GPGME(1.1.1, AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1,
- [Define if GPGME supports PKA]))
- #needed to get GPGME_LIBS and al correctly
- AM_PATH_GPGME(1.0.0, AC_DEFINE(CRYPT_BACKEND_GPGME, 1,
- [Define if you use GPGME to support OpenPGP]))
- dnl AC_CHECK_FUNCS([gpgme_op_export_keys])
- saved_LIBS="$LIBS"
- LIBS="$LIBS $GPGME_LIBS"
- AC_CHECK_FUNCS([gpgme_op_export_keys])
- LIBS="$saved_LIBS"
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS crypt-gpgme.o crypt-mod-pgp-gpgme.o crypt-mod-smime-gpgme.o"
fi
else
diff --git a/crypt-gpgme.c b/crypt-gpgme.c
index 83293ec6..55488357 100644
--- a/crypt-gpgme.c
+++ b/crypt-gpgme.c
@@ -1236,8 +1236,6 @@ static int show_sig_summary (unsigned long sum,
state_puts ("\n", s);
}
-#ifdef HAVE_GPGME_PKA_TRUST
-
if (option (OPTCRYPTUSEPKA))
{
if (sig->pka_trust == 1 && sig->pka_address)
@@ -1255,8 +1253,6 @@ static int show_sig_summary (unsigned long sum,
}
}
-#endif
-
return severe;
}
@@ -4642,7 +4638,6 @@ char *smime_gpgme_findkeys (ADDRESS *adrlist, int oppenc_mode)
return find_keys (adrlist, APPLICATION_SMIME, oppenc_mode);
}
-#ifdef HAVE_GPGME_OP_EXPORT_KEYS
BODY *pgp_gpgme_make_key_attachment (char *tempf)
{
crypt_key_t *key = NULL;
@@ -4703,7 +4698,6 @@ bail:
return att;
}
-#endif
/*
* Implementation of `init'.
diff --git a/crypt-mod-pgp-classic.c b/crypt-mod-pgp-classic.c
index b0534afe..41c59d99 100644
--- a/crypt-mod-pgp-classic.c
+++ b/crypt-mod-pgp-classic.c
@@ -119,7 +119,7 @@ struct crypt_module_specs crypt_mod_pgp_classic =
crypt_mod_pgp_sign_message,
crypt_mod_pgp_verify_one,
crypt_mod_pgp_send_menu,
- NULL,
+ NULL, /* (set_sender) */
crypt_mod_pgp_encrypt_message,
crypt_mod_pgp_make_key_attachment,
diff --git a/crypt-mod-pgp-gpgme.c b/crypt-mod-pgp-gpgme.c
index 5521db97..a6b44d25 100644
--- a/crypt-mod-pgp-gpgme.c
+++ b/crypt-mod-pgp-gpgme.c
@@ -95,12 +95,10 @@ static BODY *crypt_mod_pgp_encrypt_message (BODY *a, char *keylist, int sign)
return pgp_gpgme_encrypt_message (a, keylist, sign);
}
-#ifdef HAVE_GPGME_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)
{
@@ -125,11 +123,7 @@ 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 */