diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2002-02-12 20:45:47 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2002-02-12 20:45:47 +0000 |
commit | 89ebfe01e1466560cb77323ea3634f6b399e8eb6 (patch) | |
tree | ea055b1ac9fd3a1eafe3410c8a15b291c500e5b6 | |
parent | ba1b8e04583a4e423e9754b204c988632bf3dc88 (diff) |
Mike Schiraldi's daily S/MIME patch.
-rw-r--r-- | extlib.c | 1 | ||||
-rw-r--r-- | main.c | 5 | ||||
-rw-r--r-- | pattern.c | 6 | ||||
-rwxr-xr-x | smime_keys.pl | 18 |
4 files changed, 18 insertions, 12 deletions
@@ -27,6 +27,7 @@ #define WHERE #define _EXTLIB_C +#include <stdlib.h> #include "lib.h" void (*mutt_error) (const char *, ...) = mutt_nocurses_error; @@ -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 " @@ -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<<EOF; +Couldn't launch mutt. I attempted to do so by running the command "$mutt". +If that's not the right command, you can override it by setting the +environment variable \$MUTT_CMDLINE +EOF + + $cmd = "$mutt -Q $var 2>/dev/null"; my $answer = `$cmd`; $? and die<<EOF; @@ -357,9 +367,9 @@ sub query_label () { sub add_entry ($$$$$) { my $mailbox = shift or die; my $hashvalue = shift or die; - my $use_cert = shift or die; + my $use_cert = shift; my $label = shift or die; - my $issuer_hash = shift or die; + my $issuer_hash = shift; my @fields; @@ -647,7 +657,7 @@ sub handle_pem (@) { sub modify_entry ($$$;$ ) { my $op = shift or die; my $hashvalue = shift or die; - my $use_cert = shift or die; + my $use_cert = shift; my $crl; my $label; my $path; |