Commit fbbe58b8 authored by Brendan Cully's avatar Brendan Cully

Handle DONTHANDLEPGPKEYS in handler instead of crypto modules.

This lets gpgme and classic pgp share a bit of logic, and unbreaks key
extraction at least for classic PGP.
parent b8a409f2
2008-07-01 13:32 -0700 Brendan Cully <[email protected]> (17525e17fa7b)
* copy.c: Bail out of copy if decryption is requested but the desired
engine is missing. This closes #2684, but handling of mixed crypto
in a single message needs more investigation.
2008-07-01 01:10 -0700 rtc <[email protected]> (49fe0292b503)
* copy.c: When deleting attachments, always print newline
separating header from body. Closes #3085.
2008-06-29 01:09 -0700 Brendan Cully <[email protected]> (677e7712d735)
* crypt-gpgme.c: Improve gpgme SMIME uid display: align each line by
......
......@@ -2044,12 +2044,11 @@ int pgp_gpgme_application_handler (BODY *m, STATE *s)
clearsign = 1;
needpass = 0;
}
else if (!option (OPTDONTHANDLEPGPKEYS) &&
!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
{
needpass = 0;
pgp_keyblock =1;
}
else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
{
needpass = 0;
pgp_keyblock = 1;
}
else
{
/* XXX - we may wish to recode here */
......
......@@ -1579,9 +1579,15 @@ int mutt_body_handler (BODY *b, STATE *s)
}
else if (WithCrypto && b->type == TYPEAPPLICATION)
{
if ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b))
if (option (OPTDONTHANDLEPGPKEYS)
&& !ascii_strcasecmp("pgp-keys", b->subtype))
{
/* pass raw part through for key extraction */
plaintext = 1;
}
else if ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b))
handler = crypt_pgp_application_pgp_handler;
if ((WithCrypto & APPLICATION_SMIME) && mutt_is_application_smime(b))
else if ((WithCrypto & APPLICATION_SMIME) && mutt_is_application_smime(b))
handler = crypt_smime_application_smime_handler;
}
......
......@@ -293,11 +293,10 @@ int pgp_application_pgp_handler (BODY *m, STATE *s)
clearsign = 1;
needpass = 0;
}
else if (!option (OPTDONTHANDLEPGPKEYS) &&
mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0)
else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
{
needpass = 0;
pgp_keyblock =1;
pgp_keyblock = 1;
}
else
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment