Commit 89ebfe01 authored by Thomas Roessler's avatar Thomas Roessler

Mike Schiraldi's daily S/MIME patch.

parent ba1b8e04
......@@ -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:
......
......@@ -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;
......
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