From: Thomas Roessler Date: Tue, 12 Feb 2002 20:45:47 +0000 (+0000) Subject: Mike Schiraldi's daily S/MIME patch. X-Git-Tag: mutt-1-5-1-rel~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89ebfe01e1466560cb77323ea3634f6b399e8eb6;p=mutt Mike Schiraldi's daily S/MIME patch. --- diff --git a/extlib.c b/extlib.c index 1eeb7100..74fb03b2 100644 --- a/extlib.c +++ b/extlib.c @@ -27,6 +27,7 @@ #define WHERE #define _EXTLIB_C +#include #include "lib.h" void (*mutt_error) (const char *, ...) = mutt_nocurses_error; diff --git a/main.c b/main.c index 9b1c066c..788c84c5 100644 --- a/main.c +++ b/main.c @@ -299,11 +299,6 @@ static void show_version (void) #else "-HAVE_PGP " #endif -#ifdef HAVE_SMIME - "+HAVE_SMIME " -#else - "-HAVE_SMIME " -#endif #ifdef HAVE_SMIME "+HAVE_SMIME " diff --git a/pattern.c b/pattern.c index a85fd48b..41f38047 100644 --- a/pattern.c +++ b/pattern.c @@ -1050,11 +1050,11 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx, return (pat->not ^ (h->collapsed && h->num_hidden > 1)); #if defined (HAVE_PGP) || defined (HAVE_SMIME) case M_CRYPT_SIGN: - return (pat->not ^ h->security & SIGN); + return (pat->not ^ (h->security & SIGN)); case M_CRYPT_VERIFIED: - return (pat->not ^ h->security & GOODSIGN); + return (pat->not ^ (h->security & GOODSIGN)); case M_CRYPT_ENCRYPT: - return (pat->not ^ h->security & ENCRYPT); + return (pat->not ^ (h->security & ENCRYPT)); #endif #ifdef HAVE_PGP case M_PGP_KEY: diff --git a/smime_keys.pl b/smime_keys.pl index ce8a7e40..2e2ee466 100755 --- a/smime_keys.pl +++ b/smime_keys.pl @@ -49,6 +49,8 @@ sub do_verify($$$ ); # Get the directories mutt uses for certificate/key storage. +my $mutt = $ENV{MUTT_CMDLINE} || 'mutt'; + my $private_keys_path = mutt_Q 'smime_keys'; my $certificates_path = mutt_Q 'smime_certificates'; my $root_certs_path = mutt_Q 'smime_ca_location'; @@ -192,7 +194,15 @@ EOF sub mutt_Q ($) { my $var = shift or die; - my $cmd = "mutt -Q $var 2>/dev/null"; + my $cmd = "$mutt -v >/dev/null 2>/dev/null"; + system ($cmd) == 0 + or die<