コード例 #1
0
ファイル: cryptglue.c プロジェクト: 0xAX/muttx
static int register_gpgme()
{
	if (!bit_val(options, OPTCRYPTUSEGPGME))
	{
		mutt_message(("\"crypt_use_gpgme\" set"
			      " but not built with GPGME support."));
		return 0;
	}
	else
	{
		crypto_module_register(&crypt_mod_pgp_gpgme);
		crypto_module_register(&crypt_mod_smime_gpgme);
		return 1;
	}
}
コード例 #2
0
ファイル: cryptglue.c プロジェクト: darnir/neomutt
/**
 * crypt_init - Initialise the crypto backends
 *
 * This calls CryptModuleSpecs::init()
 */
void crypt_init(void)
{
#ifdef CRYPT_BACKEND_CLASSIC_PGP
  if (
#ifdef CRYPT_BACKEND_GPGME
      (!C_CryptUseGpgme)
#else
      1
#endif
  )
    crypto_module_register(&CryptModPgpClassic);
#endif

#ifdef CRYPT_BACKEND_CLASSIC_SMIME
  if (
#ifdef CRYPT_BACKEND_GPGME
      (!C_CryptUseGpgme)
#else
      1
#endif
  )
    crypto_module_register(&CryptModSmimeClassic);
#endif

  if (C_CryptUseGpgme)
  {
#ifdef CRYPT_BACKEND_GPGME
    crypto_module_register(&CryptModPgpGpgme);
    crypto_module_register(&CryptModSmimeGpgme);
#else
    mutt_message(_("\"crypt_use_gpgme\" set"
                   " but not built with GPGME support"));
    if (mutt_any_key_to_continue(NULL) == -1)
      mutt_exit(1);
#endif
  }

#if defined(CRYPT_BACKEND_CLASSIC_PGP) ||                                      \
    defined(CRYPT_BACKEND_CLASSIC_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(SMIME, init)();
#endif
}
コード例 #3
0
ファイル: cryptglue.c プロジェクト: SteveClement/mutt
void crypt_init (void)
{
#ifdef CRYPT_BACKEND_CLASSIC_PGP
  if (
#ifdef CRYPT_BACKEND_GPGME
      (! option (OPTCRYPTUSEGPGME))
#else
       1
#endif
      )
    crypto_module_register (&crypt_mod_pgp_classic);
#endif

#ifdef CRYPT_BACKEND_CLASSIC_SMIME
  if (
#ifdef CRYPT_BACKEND_GPGME
      (! option (OPTCRYPTUSEGPGME))
#else
       1
#endif
      )
    crypto_module_register (&crypt_mod_smime_classic);
#endif

  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 built with GPGME support."));
      if (mutt_any_key_to_continue (NULL) == -1)
	mutt_exit(1);
#endif
    }

#if defined CRYPT_BACKEND_CLASSIC_PGP || defined CRYPT_BACKEND_CLASSIC_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 (SMIME, init)) ();
#endif
}
コード例 #4
0
ファイル: cryptglue.c プロジェクト: 0xAX/muttx
static inline void register_smime_classic()
{
	crypto_module_register(&crypt_mod_smime_classic);
}