contained in this file and the functions implemented by the crypto
modules. */
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <lib-lib/macros.h>
+#include <lib-lib/lib-lib.h>
#include "mutt.h"
#include "crypt.h"
-
-
#include "crypt-mod.h"
/*
Generic
*/
-extern struct crypt_module_specs crypt_mod_pgp_classic;
-extern struct crypt_module_specs crypt_mod_smime_classic;
-
-#ifdef CRYPT_BACKEND_GPGME
extern struct crypt_module_specs crypt_mod_pgp_gpgme;
extern struct crypt_module_specs crypt_mod_smime_gpgme;
-#endif
void crypt_init (void)
{
- if (
-#ifdef CRYPT_BACKEND_GPGME
- (!option (OPTCRYPTUSEGPGME))
-#else
- 1
-#endif
- )
- crypto_module_register (&crypt_mod_pgp_classic);
-
- if (
-#ifdef CRYPT_BACKEND_GPGME
- (!option (OPTCRYPTUSEGPGME))
-#else
- 1
-#endif
- )
- crypto_module_register (&crypt_mod_smime_classic);
-
- if (option (OPTCRYPTUSEGPGME)) {
-#ifdef CRYPT_BACKEND_GPGME
crypto_module_register (&crypt_mod_pgp_gpgme);
crypto_module_register (&crypt_mod_smime_gpgme);
-#else
- mutt_message (_("\"crypt_use_gpgme\" set"
- " but not build with GPGME support."));
- if (mutt_any_key_to_continue (NULL) == -1)
- mutt_exit (1);
-#endif
- }
-
-#if defined CRYPT_BACKEND_CLASSIG_PGP || defined CRYPT_BACKEND_CLASSIG_SMIME || defined CRYPT_BACKEND_GPGME
- if (CRYPT_MOD_CALL_CHECK (PGP, init))
- (CRYPT_MOD_CALL (PGP, init)) ();
- if (CRYPT_MOD_CALL_CHECK (SMIME, init))
+ (CRYPT_MOD_CALL(PGP, init))();
(CRYPT_MOD_CALL (SMIME, init)) ();
-#endif
}
-
/* Show a message that a backend will be invoked. */
void crypt_invoke_message (int type)
{
mutt_message _("Invoking S/MIME...");
}
}
-\f
/*
return (-1);
}
-/* MIME handler for an PGP/MIME encrypted message. */
-int crypt_smime_encrypted_handler (BODY * a, STATE * s)
-{
- if (CRYPT_MOD_CALL_CHECK (SMIME, encrypted_handler))
- return (CRYPT_MOD_CALL (SMIME, encrypted_handler)) (a, s);
- return (-1);
-}
-
/* fixme: Needs documentation. */
void crypt_smime_getkeys (ENVELOPE * env)
{