]> granicus.if.org Git - mutt/commitdiff
Require GPGME version 1.2.0 and drop useless HAVE macros.
authorWerner Koch <wk@gnupg.org>
Mon, 3 Dec 2018 07:41:53 +0000 (08:41 +0100)
committerKevin McCarthy <kevin@8t8.us>
Wed, 5 Dec 2018 02:58:20 +0000 (18:58 -0800)
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>
configure.ac
crypt-gpgme.c
crypt-mod-pgp-classic.c
crypt-mod-pgp-gpgme.c

index d8aebe336edc75f5eaad05d82b9c456a1f074bdb..8ab8b0c324388208c4481f64f179cbb618c44bb1 100644 (file)
@@ -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
index 83293ec6cde5eec38b5d07ce087d0becfc8fbf50..554883571473908e7b7aa7ab4d256153f4dd4ea1 100644 (file)
@@ -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'.
index b0534afe8ce3904dd7177c864fea7b73842b13f7..41c59d994f70f9047aba3bb67e3ed89759fc345c 100644 (file)
@@ -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,
index 5521db974fbf700e583e84e9752a69691e81180c..a6b44d2539152b07cfddab144635abc757a9aaf5 100644 (file)
@@ -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  */