** even for bad signatures.
** (PGP only)
*/
+ { "pgp_check_exit", DT_BOOL, R_NONE, OPTPGPCHECKEXIT, 1 },
+ /*
+ ** .pp
+ ** If set, mutt will check the exit code of the PGP subprocess when
+ ** signing or encrypting. A non-zero exit code means that the
+ ** subprocess failed.
+ ** (PGP only)
+ */
{ "pgp_long_ids", DT_BOOL, R_NONE, OPTPGPLONGIDS, 0 },
/*
** .pp
fputs (buffer, stdout);
}
- mutt_wait_filter (thepid);
+ if(mutt_wait_filter (thepid) && option(OPTPGPCHECKEXIT))
+ empty=1;
+
fclose (pgperr);
fclose (pgpout);
unlink (signedfile);
FILE *pgpin, *pgperr, *fpout, *fptmp;
BODY *t;
int err = 0;
- int empty;
+ int empty = 0;
pid_t thepid;
mutt_mktemp (tempfile);
}
fclose(pgpin);
- mutt_wait_filter (thepid);
+ if(mutt_wait_filter (thepid) && option(OPTPGPCHECKEXIT))
+ empty=1;
+
unlink(pgpinfile);
fflush (fpout);
rewind (fpout);
- empty = (fgetc (fpout) == EOF);
+ if(!empty)
+ empty = (fgetc (fpout) == EOF);
fclose (fpout);
fflush (pgperr);
FILE *pgpout = NULL, *pgperr = NULL, *pgpin = NULL;
FILE *fp;
- int empty;
+ int empty = 0;
int err;
char buff[STRING];
fprintf (pgpin, "%s\n", PgpPass);
fclose (pgpin);
- mutt_wait_filter (thepid);
+ if(mutt_wait_filter (thepid) && option(OPTPGPCHECKEXIT))
+ empty=1;
mutt_unlink (pgpinfile);
rewind (pgpout);
rewind (pgperr);
- empty = (fgetc (pgpout) == EOF);
+ if(!empty)
+ empty = (fgetc (pgpout) == EOF);
fclose (pgpout);
err = 0;