projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
various code simplifications.
[apps/madmutt.git]
/
lib-crypt
/
smime.c
diff --git
a/lib-crypt/smime.c
b/lib-crypt/smime.c
index
0080b6a
..
4a4f89c
100644
(file)
--- a/
lib-crypt/smime.c
+++ b/
lib-crypt/smime.c
@@
-356,7
+356,7
@@
char *smime_ask_for_key (char *prompt, char *mailbox __attribute__((unused)),
if (fgets (buf, sizeof (buf), idx))
cert_num++;
}
if (fgets (buf, sizeof (buf), idx))
cert_num++;
}
-
fclose (
idx);
+
m_fclose(&
idx);
for (;;) {
*qry = 0;
for (;;) {
*qry = 0;
@@
-399,17
+399,17
@@
char *smime_ask_for_key (char *prompt, char *mailbox __attribute__((unused)),
cur++;
}
cur++;
}
-
fclose (
idx);
+
m_fclose(&
idx);
/* Make Helpstring */
helpstr[0] = 0;
mutt_make_help (buf, sizeof (buf), _("Exit "), MENU_SMIME, OP_EXIT);
/* Make Helpstring */
helpstr[0] = 0;
mutt_make_help (buf, sizeof (buf), _("Exit "), MENU_SMIME, OP_EXIT);
- strcat (helpstr, buf); /* __STRCAT_CHECKED__ */
+ m_strcat(helpstr, sizeof(helpstr), buf);
mutt_make_help (buf, sizeof (buf), _("Select "), MENU_SMIME,
OP_GENERIC_SELECT_ENTRY);
mutt_make_help (buf, sizeof (buf), _("Select "), MENU_SMIME,
OP_GENERIC_SELECT_ENTRY);
- strcat (helpstr, buf); /* __STRCAT_CHECKED__ */
+ m_strcat(helpstr, sizeof(helpstr), buf);
mutt_make_help (buf, sizeof (buf), _("Help"), MENU_SMIME, OP_HELP);
mutt_make_help (buf, sizeof (buf), _("Help"), MENU_SMIME, OP_HELP);
- strcat (helpstr, buf); /* __STRCAT_CHECKED__ */
+ m_strcat(helpstr, sizeof(helpstr), buf);
/* Create the menu */
menu = mutt_new_menu ();
/* Create the menu */
menu = mutt_new_menu ();
@@
-708,8
+708,6
@@
char *smime_findKeys (address_t * to, address_t * cc, address_t * bcc)
address_t *p, *q;
int i;
address_t *p, *q;
int i;
- const char *fqdn = mutt_fqdn (1);
-
for (i = 0; i < 3; i++) {
switch (i) {
case 0:
for (i = 0; i < 3; i++) {
switch (i) {
case 0:
@@
-730,8
+728,7
@@
char *smime_findKeys (address_t * to, address_t * cc, address_t * bcc)
last = &((*last)->next);
}
last = &((*last)->next);
}
- if (fqdn)
- rfc822_qualify (tmp, fqdn);
+ rfc822_qualify(tmp, mutt_fqdn(1));
address_list_uniq(tmp);
address_list_uniq(tmp);
@@
-754,7
+751,7
@@
char *smime_findKeys (address_t * to, address_t * cc, address_t * bcc)
keylist_size += m_strlen(keyID) + 2;
p_realloc(&keylist, keylist_size);
keylist_size += m_strlen(keyID) + 2;
p_realloc(&keylist, keylist_size);
- sprintf (keylist + keylist_used, "%s\n", keyID);
/* __SPRINTF_CHECKED__ */
+ sprintf (keylist + keylist_used, "%s\n", keyID);
keylist_used = m_strlen(keylist);
address_list_wipe(&addr);
keylist_used = m_strlen(keylist);
address_list_wipe(&addr);
@@
-787,7
+784,7
@@
static int smime_handle_cert_email (char *certificate, char *mailbox,
fpout = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(Tempdir), NULL);
if (!fpout) {
fpout = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(Tempdir), NULL);
if (!fpout) {
-
fclose (
fperr);
+
m_fclose(&
fperr);
mutt_perror (tmpfname);
return 1;
}
mutt_perror (tmpfname);
return 1;
}
@@
-798,8
+795,8
@@
static int smime_handle_cert_email (char *certificate, char *mailbox,
certificate, NULL, NULL, NULL, NULL, NULL,
SmimeGetCertEmailCommand)) == -1) {
mutt_message (_("Error: unable to create OpenSSL subprocess!"));
certificate, NULL, NULL, NULL, NULL, NULL,
SmimeGetCertEmailCommand)) == -1) {
mutt_message (_("Error: unable to create OpenSSL subprocess!"));
-
fclose (
fperr);
-
fclose (
fpout);
+
m_fclose(&
fperr);
+
m_fclose(&
fpout);
return 1;
}
return 1;
}
@@
-847,8
+844,8
@@
static int smime_handle_cert_email (char *certificate, char *mailbox,
else if (copy)
ret = 2;
else if (copy)
ret = 2;
-
fclose (
fpout);
-
fclose (
fperr);
+
m_fclose(&
fpout);
+
m_fclose(&
fperr);
return ret;
}
return ret;
}
@@
-873,7
+870,7
@@
static char *smime_extract_certificate (char *infile)
fpout = m_tempfile (pk7out, sizeof(tmpfname), NONULL(Tempdir), NULL);
if (!fpout) {
fpout = m_tempfile (pk7out, sizeof(tmpfname), NONULL(Tempdir), NULL);
if (!fpout) {
-
fclose (
fperr);
+
m_fclose(&
fperr);
mutt_perror (pk7out);
return NULL;
}
mutt_perror (pk7out);
return NULL;
}
@@
-887,8
+884,8
@@
static char *smime_extract_certificate (char *infile)
SmimePk7outCommand)) == -1) {
mutt_any_key_to_continue (_
("Error: unable to create OpenSSL subprocess!"));
SmimePk7outCommand)) == -1) {
mutt_any_key_to_continue (_
("Error: unable to create OpenSSL subprocess!"));
-
fclose (
fperr);
-
fclose (
fpout);
+
m_fclose(&
fperr);
+
m_fclose(&
fpout);
mutt_unlink (pk7out);
return NULL;
}
mutt_unlink (pk7out);
return NULL;
}
@@
-903,19
+900,19
@@
static char *smime_extract_certificate (char *infile)
empty = (fgetc (fpout) == EOF);
empty = (fgetc (fpout) == EOF);
-
fclose (
fpout);
+
m_fclose(&
fpout);
if (empty) {
mutt_perror (pk7out);
mutt_copy_stream (fperr, stdout);
if (empty) {
mutt_perror (pk7out);
mutt_copy_stream (fperr, stdout);
-
fclose (
fperr);
+
m_fclose(&
fperr);
mutt_unlink (pk7out);
return NULL;
}
fpout = m_tempfile (certfile, sizeof(certfile), NONULL(Tempdir), NULL);
if (!fpout) {
mutt_unlink (pk7out);
return NULL;
}
fpout = m_tempfile (certfile, sizeof(certfile), NONULL(Tempdir), NULL);
if (!fpout) {
-
fclose (
fperr);
+
m_fclose(&
fperr);
mutt_unlink (pk7out);
mutt_perror (certfile);
return NULL;
mutt_unlink (pk7out);
mutt_perror (certfile);
return NULL;
@@
-929,8
+926,8
@@
static char *smime_extract_certificate (char *infile)
SmimeGetCertCommand)) == -1) {
mutt_any_key_to_continue (_
("Error: unable to create OpenSSL subprocess!"));
SmimeGetCertCommand)) == -1) {
mutt_any_key_to_continue (_
("Error: unable to create OpenSSL subprocess!"));
-
fclose (
fperr);
-
fclose (
fpout);
+
m_fclose(&
fperr);
+
m_fclose(&
fpout);
mutt_unlink (pk7out);
mutt_unlink (certfile);
return NULL;
mutt_unlink (pk7out);
mutt_unlink (certfile);
return NULL;
@@
-947,14
+944,14
@@
static char *smime_extract_certificate (char *infile)
empty = (fgetc (fpout) == EOF);
if (empty) {
mutt_copy_stream (fperr, stdout);
empty = (fgetc (fpout) == EOF);
if (empty) {
mutt_copy_stream (fperr, stdout);
-
fclose (
fpout);
-
fclose (
fperr);
+
m_fclose(&
fpout);
+
m_fclose(&
fperr);
mutt_unlink (certfile);
return NULL;
}
mutt_unlink (certfile);
return NULL;
}
-
fclose (
fpout);
-
fclose (
fperr);
+
m_fclose(&
fpout);
+
m_fclose(&
fperr);
return m_strdup(certfile);
}
return m_strdup(certfile);
}
@@
-976,7
+973,7
@@
static char *smime_extract_signer_certificate (char *infile)
m_tempfile (certfile, sizeof(certfile), NONULL(Tempdir), NULL);
if (!fpout) {
m_tempfile (certfile, sizeof(certfile), NONULL(Tempdir), NULL);
if (!fpout) {
-
fclose (
fperr);
+
m_fclose(&
fperr);
mutt_perror (certfile);
return NULL;
}
mutt_perror (certfile);
return NULL;
}
@@
-989,8
+986,8
@@
static char *smime_extract_signer_certificate (char *infile)
SmimeGetSignerCertCommand)) == -1) {
mutt_any_key_to_continue (_
("Error: unable to create OpenSSL subprocess!"));
SmimeGetSignerCertCommand)) == -1) {
mutt_any_key_to_continue (_
("Error: unable to create OpenSSL subprocess!"));
-
fclose (
fperr);
-
fclose (
fpout);
+
m_fclose(&
fperr);
+
m_fclose(&
fpout);
mutt_unlink (pk7out);
mutt_unlink (certfile);
return NULL;
mutt_unlink (pk7out);
mutt_unlink (certfile);
return NULL;
@@
-1003,18
+1000,18
@@
static char *smime_extract_signer_certificate (char *infile)
rewind (fperr);
fflush (fperr);
empty = (fgetc (fpout) == EOF);
rewind (fperr);
fflush (fperr);
empty = (fgetc (fpout) == EOF);
+ m_fclose(&fpout);
+
if (empty) {
mutt_endwin (NULL);
mutt_copy_stream (fperr, stdout);
mutt_any_key_to_continue (NULL);
if (empty) {
mutt_endwin (NULL);
mutt_copy_stream (fperr, stdout);
mutt_any_key_to_continue (NULL);
- fclose (fpout);
- fclose (fperr);
+ m_fclose(&fperr);
mutt_unlink (certfile);
return NULL;
}
mutt_unlink (certfile);
return NULL;
}
- fclose (fpout);
- fclose (fperr);
+ m_fclose(&fperr);
return m_strdup(certfile);
}
return m_strdup(certfile);
}
@@
-1036,7
+1033,7
@@
void smime_invoke_import (char *infile, char *mailbox __attribute__ ((unused)))
fpout = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(Tempdir), NULL);
if (!fpout) {
fpout = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(Tempdir), NULL);
if (!fpout) {
-
fclose (
fperr);
+
m_fclose(&
fperr);
mutt_perror (tmpfname);
return;
}
mutt_perror (tmpfname);
return;
}
@@
-1059,7
+1056,7
@@
void smime_invoke_import (char *infile, char *mailbox __attribute__ ((unused)))
}
fputs (buf, smimein);
fputc ('\n', smimein);
}
fputs (buf, smimein);
fputc ('\n', smimein);
-
fclose (
smimein);
+
m_fclose(&
smimein);
mutt_wait_filter (thepid);
mutt_wait_filter (thepid);
@@
-1075,13
+1072,10
@@
void smime_invoke_import (char *infile, char *mailbox __attribute__ ((unused)))
mutt_copy_stream (fpout, stdout);
mutt_copy_stream (fperr, stdout);
mutt_copy_stream (fpout, stdout);
mutt_copy_stream (fperr, stdout);
- fclose (fpout);
- fclose (fperr);
-
+ m_fclose(&fpout);
+ m_fclose(&fperr);
}
}
-
-
int smime_verify_sender (HEADER * h)
{
char *mbox = NULL, *certfile, tempfname[_POSIX_PATH_MAX];
int smime_verify_sender (HEADER * h)
{
char *mbox = NULL, *certfile, tempfname[_POSIX_PATH_MAX];
@@
-1090,7
+1084,7
@@
int smime_verify_sender (HEADER * h)
fpout = m_tempfile (tempfname, sizeof(tempfname), NONULL(Tempdir), NULL);
if (!fpout) {
fpout = m_tempfile (tempfname, sizeof(tempfname), NONULL(Tempdir), NULL);
if (!fpout) {
- mutt_perror (
tempfname
);
+ mutt_perror (
_("Can't create temporary file")
);
return 1;
}
return 1;
}
@@
-1102,7
+1096,7
@@
int smime_verify_sender (HEADER * h)
mutt_copy_message (fpout, Context, h, 0, 0);
fflush (fpout);
mutt_copy_message (fpout, Context, h, 0, 0);
fflush (fpout);
-
fclose (
fpout);
+
m_fclose(&
fpout);
if (h->env->from) {
h->env->from = mutt_expand_aliases (h->env->from);
if (h->env->from) {
h->env->from = mutt_expand_aliases (h->env->from);
@@
-1190,14
+1184,14
@@
BODY *smime_build_smime_entity (BODY * a, char *certlist)
fpout = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
if (!fpout) {
fpout = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
if (!fpout) {
- mutt_perror (
tempfile
);
+ mutt_perror (
_("Can't create temporary file")
);
return NULL;
}
smimeerr = m_tempfile (smimeerrfile, sizeof(smimeerrfile), NONULL(Tempdir), NULL);
if (!smimeerr) {
mutt_perror (smimeerrfile);
return NULL;
}
smimeerr = m_tempfile (smimeerrfile, sizeof(smimeerrfile), NONULL(Tempdir), NULL);
if (!smimeerr) {
mutt_perror (smimeerrfile);
-
fclose (
fpout);
+
m_fclose(&
fpout);
mutt_unlink (tempfile);
return NULL;
}
mutt_unlink (tempfile);
return NULL;
}
@@
-1207,8
+1201,8
@@
BODY *smime_build_smime_entity (BODY * a, char *certlist)
if (!fptmp) {
mutt_perror (smimeinfile);
mutt_unlink (tempfile);
if (!fptmp) {
mutt_perror (smimeinfile);
mutt_unlink (tempfile);
-
fclose (
fpout);
-
fclose (
smimeerr);
+
m_fclose(&
fpout);
+
m_fclose(&
smimeerr);
return NULL;
}
return NULL;
}
@@
-1231,19
+1225,19
@@
BODY *smime_build_smime_entity (BODY * a, char *certlist)
mutt_write_mime_header (a, fptmp);
fputc ('\n', fptmp);
mutt_write_mime_body (a, fptmp);
mutt_write_mime_header (a, fptmp);
fputc ('\n', fptmp);
mutt_write_mime_body (a, fptmp);
-
fclose (
fptmp);
+
m_fclose(&
fptmp);
if ((thepid =
smime_invoke_encrypt (&smimein, NULL, NULL, -1,
fileno (fpout), fileno (smimeerr),
smimeinfile, certfile)) == -1) {
if ((thepid =
smime_invoke_encrypt (&smimein, NULL, NULL, -1,
fileno (fpout), fileno (smimeerr),
smimeinfile, certfile)) == -1) {
-
fclose (
smimeerr);
+
m_fclose(&
smimeerr);
mutt_unlink (smimeinfile);
mutt_unlink (certfile);
return (NULL);
}
mutt_unlink (smimeinfile);
mutt_unlink (certfile);
return (NULL);
}
-
fclose (
smimein);
+
m_fclose(&
smimein);
mutt_wait_filter (thepid);
mutt_unlink (smimeinfile);
mutt_wait_filter (thepid);
mutt_unlink (smimeinfile);
@@
-1252,7
+1246,7
@@
BODY *smime_build_smime_entity (BODY * a, char *certlist)
fflush (fpout);
rewind (fpout);
empty = (fgetc (fpout) == EOF);
fflush (fpout);
rewind (fpout);
empty = (fgetc (fpout) == EOF);
-
fclose (
fpout);
+
m_fclose(&
fpout);
fflush (smimeerr);
rewind (smimeerr);
fflush (smimeerr);
rewind (smimeerr);
@@
-1260,7
+1254,7
@@
BODY *smime_build_smime_entity (BODY * a, char *certlist)
err = 1;
fputs (buf, stdout);
}
err = 1;
fputs (buf, stdout);
}
-
fclose (
smimeerr);
+
m_fclose(&
smimeerr);
/* pause if there is any error output from SMIME */
if (err)
/* pause if there is any error output from SMIME */
if (err)
@@
-1322,7
+1316,7
@@
BODY *smime_sign_message (BODY * a)
smimeout = m_tempfile (signedfile, sizeof(signedfile), NONULL(Tempdir), NULL);
if (!smimeout) {
mutt_perror (signedfile);
smimeout = m_tempfile (signedfile, sizeof(signedfile), NONULL(Tempdir), NULL);
if (!smimeout) {
mutt_perror (signedfile);
-
fclose (
sfp);
+
m_fclose(&
sfp);
mutt_unlink (filetosign);
return NULL;
}
mutt_unlink (filetosign);
return NULL;
}
@@
-1330,7
+1324,7
@@
BODY *smime_sign_message (BODY * a)
mutt_write_mime_header (a, sfp);
fputc ('\n', sfp);
mutt_write_mime_body (a, sfp);
mutt_write_mime_header (a, sfp);
fputc ('\n', sfp);
mutt_write_mime_body (a, sfp);
-
fclose (
sfp);
+
m_fclose(&
sfp);
@@
-1350,14
+1344,14
@@
BODY *smime_sign_message (BODY * a)
filetosign)) == -1) {
mutt_perror (_("Can't open OpenSSL subprocess!"));
filetosign)) == -1) {
mutt_perror (_("Can't open OpenSSL subprocess!"));
-
fclose (
smimeout);
+
m_fclose(&
smimeout);
mutt_unlink (signedfile);
mutt_unlink (filetosign);
return NULL;
}
fputs (SmimePass, smimein);
fputc ('\n', smimein);
mutt_unlink (signedfile);
mutt_unlink (filetosign);
return NULL;
}
fputs (SmimePass, smimein);
fputc ('\n', smimein);
-
fclose (
smimein);
+
m_fclose(&
smimein);
mutt_wait_filter (thepid);
mutt_wait_filter (thepid);
@@
-1370,13
+1364,13
@@
BODY *smime_sign_message (BODY * a)
err = 1;
fputs (buffer, stdout);
}
err = 1;
fputs (buffer, stdout);
}
-
fclose (
smimeerr);
+
m_fclose(&
smimeerr);
fflush (smimeout);
rewind (smimeout);
empty = (fgetc (smimeout) == EOF);
fflush (smimeout);
rewind (smimeout);
empty = (fgetc (smimeout) == EOF);
-
fclose (
smimeout);
+
m_fclose(&
smimeout);
mutt_unlink (filetosign);
mutt_unlink (filetosign);
@@
-1490,7
+1484,7
@@
int smime_verify_one (BODY * sigbdy, STATE * s, const char *tempfile)
sigbdy->length = ftello (s->fpout);
sigbdy->offset = 0;
sigbdy->length = ftello (s->fpout);
sigbdy->offset = 0;
-
fclose (
s->fpout);
+
m_fclose(&
s->fpout);
/* restore final destination and substitute the tempfile for input */
s->fpout = fp;
/* restore final destination and substitute the tempfile for input */
s->fpout = fp;
@@
-1514,8
+1508,7
@@
int smime_verify_one (BODY * sigbdy, STATE * s, const char *tempfile)
if ((thepid = smime_invoke_verify (NULL, &smimeout, NULL,
-1, -1, fileno (smimeerr),
tempfile, signedfile, 0)) != -1) {
if ((thepid = smime_invoke_verify (NULL, &smimeout, NULL,
-1, -1, fileno (smimeerr),
tempfile, signedfile, 0)) != -1) {
- fflush (smimeout);
- fclose (smimeout);
+ m_fclose(&smimeout);
if (mutt_wait_filter (thepid))
badsig = -1;
if (mutt_wait_filter (thepid))
badsig = -1;
@@
-1538,7
+1531,7
@@
int smime_verify_one (BODY * sigbdy, STATE * s, const char *tempfile)
fflush (smimeerr);
rewind (smimeerr);
mutt_copy_stream (smimeerr, s->fpout);
fflush (smimeerr);
rewind (smimeerr);
mutt_copy_stream (smimeerr, s->fpout);
-
fclose (
smimeerr);
+
m_fclose(&
smimeerr);
state_attach_puts (_("[-- End of OpenSSL output --]\n\n"), s);
state_attach_puts (_("[-- End of OpenSSL output --]\n\n"), s);
@@
-1549,7
+1542,7
@@
int smime_verify_one (BODY * sigbdy, STATE * s, const char *tempfile)
sigbdy->offset = tmpoffset;
/* restore the original source stream */
sigbdy->offset = tmpoffset;
/* restore the original source stream */
-
fclose (
s->fpin);
+
m_fclose(&
s->fpin);
s->fpin = fp;
s->fpin = fp;
@@
-1593,7
+1586,7
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
smimeerr = m_tempfile(errfile, sizeof(errfile), NONULL(Tempdir), NULL);
if (!smimeerr) {
mutt_perror (errfile);
smimeerr = m_tempfile(errfile, sizeof(errfile), NONULL(Tempdir), NULL);
if (!smimeerr) {
mutt_perror (errfile);
-
fclose (
smimeout);
+
m_fclose(&
smimeout);
return NULL;
}
mutt_unlink (errfile);
return NULL;
}
mutt_unlink (errfile);
@@
-1601,8
+1594,8
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
tmpfp = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(Tempdir), NULL);
if (!tmpfp) {
mutt_perror (tmpfname);
tmpfp = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(Tempdir), NULL);
if (!tmpfp) {
mutt_perror (tmpfname);
-
fclose (
smimeout);
-
fclose (
smimeerr);
+
m_fclose(&
smimeout);
+
m_fclose(&
smimeerr);
return NULL;
}
return NULL;
}
@@
-1610,16
+1603,13
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
last_pos = m->offset;
mutt_copy_bytes (s->fpin, tmpfp, m->length);
last_pos = m->offset;
mutt_copy_bytes (s->fpin, tmpfp, m->length);
-
- fflush (tmpfp);
- fclose (tmpfp);
+ m_fclose(&tmpfp);
if ((type & ENCRYPT) &&
(thepid = smime_invoke_decrypt (&smimein, NULL, NULL, -1,
fileno (smimeout), fileno (smimeerr),
tmpfname)) == -1) {
if ((type & ENCRYPT) &&
(thepid = smime_invoke_decrypt (&smimein, NULL, NULL, -1,
fileno (smimeout), fileno (smimeerr),
tmpfname)) == -1) {
- fclose (smimeout);
- smimeout = NULL;
+ m_fclose(&smimeout);
mutt_unlink (tmpfname);
if (s->flags & M_DISPLAY)
state_attach_puts (_("[-- Error: unable to create OpenSSL subprocess! --]\n"), s);
mutt_unlink (tmpfname);
if (s->flags & M_DISPLAY)
state_attach_puts (_("[-- Error: unable to create OpenSSL subprocess! --]\n"), s);
@@
-1630,8
+1620,7
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
fileno (smimeout),
fileno (smimeerr), NULL, tmpfname,
SIGNOPAQUE)) == -1) {
fileno (smimeout),
fileno (smimeerr), NULL, tmpfname,
SIGNOPAQUE)) == -1) {
- fclose (smimeout);
- smimeout = NULL;
+ m_fclose(&smimeout);
mutt_unlink (tmpfname);
if (s->flags & M_DISPLAY)
state_attach_puts (_("[-- Error: unable to create OpenSSL subprocess! --]\n"), s);
mutt_unlink (tmpfname);
if (s->flags & M_DISPLAY)
state_attach_puts (_("[-- Error: unable to create OpenSSL subprocess! --]\n"), s);
@@
-1646,7
+1635,7
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
fputc ('\n', smimein);
}
fputc ('\n', smimein);
}
-
fclose (
smimein);
+
m_fclose(&
smimein);
mutt_wait_filter (thepid);
mutt_unlink (tmpfname);
mutt_wait_filter (thepid);
mutt_unlink (tmpfname);
@@
-1681,7
+1670,7
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
fpout = m_tempfile (tmptmpfname, sizeof(tmptmpfname), NONULL(Tempdir), NULL);
if (!fpout) {
mutt_perror (tmptmpfname);
fpout = m_tempfile (tmptmpfname, sizeof(tmptmpfname), NONULL(Tempdir), NULL);
if (!fpout) {
mutt_perror (tmptmpfname);
-
fclose (
smimeout);
+
m_fclose(&
smimeout);
return NULL;
}
}
return NULL;
}
}
@@
-1711,12
+1700,11
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
}
}
}
}
- fclose (smimeout);
- smimeout = NULL;
+ m_fclose(&smimeout);
mutt_unlink (outfile);
if (!outFile) {
mutt_unlink (outfile);
if (!outFile) {
-
fclose (
fpout);
+
m_fclose(&
fpout);
mutt_unlink (tmptmpfname);
}
fpout = NULL;
mutt_unlink (tmptmpfname);
}
fpout = NULL;
@@
-1745,7
+1733,7
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
m->goodsig = p->goodsig;
m->badsig = p->badsig;
}
m->goodsig = p->goodsig;
m->badsig = p->badsig;
}
-
fclose (
smimeerr);
+
m_fclose(&
smimeerr);
return (p);
}
return (p);
}
@@
-1778,7
+1766,7
@@
int smime_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, BODY ** cur)
tmpfp = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
if (!tmpfp) {
tmpfp = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
if (!tmpfp) {
- mutt_perror (
tempfile
);
+ mutt_perror (
_("Can't create temporary file")
);
return (-1);
}
return (-1);
}
@@
-1794,7
+1782,7
@@
int smime_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, BODY ** cur)
*fpout = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
if (!*fpout) {
*fpout = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
if (!*fpout) {
- mutt_perror (
tempfile
);
+ mutt_perror (
_("Can't create temporary file")
);
rv = -1;
goto bail;
}
rv = -1;
goto bail;
}
@@
-1921,10
+1909,6
@@
int smime_send_menu (HEADER * msg, int *redraw)
/* probably need a different passphrase */
crypt_smime_void_passphrase ();
}
/* probably need a different passphrase */
crypt_smime_void_passphrase ();
}
-#if 0
- else
- msg->security &= ~SIGN;
-#endif
*redraw = REDRAW_FULL;
break;
*redraw = REDRAW_FULL;
break;