projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cruft--
[apps/madmutt.git]
/
lib-crypt
/
smime.c
diff --git
a/lib-crypt/smime.c
b/lib-crypt/smime.c
index
33c53b0
..
374f9f3
100644
(file)
--- a/
lib-crypt/smime.c
+++ b/
lib-crypt/smime.c
@@
-113,8
+113,8
@@
int smime_valid_passphrase (void)
/* This is almost identical to ppgp's invoking interface. */
static const char *
/* This is almost identical to ppgp's invoking interface. */
static const char *
-_mutt_fmt_smime_command (char *dest, ssize_t destlen,
char op,
- const char *src, const char *prefix,
+_mutt_fmt_smime_command (char *dest, ssize_t destlen,
+ c
har op, c
onst char *src, const char *prefix,
const char *ifstr, const char *elstr,
anytype data, format_flag flags)
{
const char *ifstr, const char *elstr,
anytype data, format_flag flags)
{
@@
-219,7
+219,7
@@
_mutt_fmt_smime_command (char *dest, ssize_t destlen, char op,
}
if (flags & M_FORMAT_OPTIONAL)
}
if (flags & M_FORMAT_OPTIONAL)
- m_strformat(dest, destlen, optional ? ifstr : elstr,
+ m_strformat(dest, destlen,
0,
optional ? ifstr : elstr,
_mutt_fmt_smime_command, data, 0);
return src;
_mutt_fmt_smime_command, data, 0);
return src;
@@
-231,7
+231,7
@@
static void mutt_smime_command (char *d, ssize_t dlen,
struct smime_command_context *cctx,
const char *fmt)
{
struct smime_command_context *cctx,
const char *fmt)
{
- m_strformat(d, dlen, fmt, _mutt_fmt_smime_command, cctx, 0);
+ m_strformat(d, dlen,
0,
fmt, _mutt_fmt_smime_command, cctx, 0);
}
static pid_t smime_invoke (FILE ** smimein, FILE ** smimeout,
}
static pid_t smime_invoke (FILE ** smimein, FILE ** smimeout,
@@
-771,14
+771,14
@@
static int smime_handle_cert_email (char *certificate, char *mailbox,
int ret = -1, count = 0;
pid_t thepid;
int ret = -1, count = 0;
pid_t thepid;
- fperr = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
Te
mpdir), NULL);
+ fperr = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
MCore.t
mpdir), NULL);
if (!fperr) {
mutt_perror (tmpfname);
return 1;
}
mutt_unlink (tmpfname);
if (!fperr) {
mutt_perror (tmpfname);
return 1;
}
mutt_unlink (tmpfname);
- fpout = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
Te
mpdir), NULL);
+ fpout = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
MCore.t
mpdir), NULL);
if (!fpout) {
m_fclose(&fperr);
mutt_perror (tmpfname);
if (!fpout) {
m_fclose(&fperr);
mutt_perror (tmpfname);
@@
-857,14
+857,14
@@
static char *smime_extract_certificate (char *infile)
int empty;
int empty;
- fperr = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
Te
mpdir), NULL);
+ fperr = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
MCore.t
mpdir), NULL);
if (!fperr) {
mutt_perror (tmpfname);
return NULL;
}
mutt_unlink (tmpfname);
if (!fperr) {
mutt_perror (tmpfname);
return NULL;
}
mutt_unlink (tmpfname);
- fpout = m_tempfile (pk7out, sizeof(tmpfname), NONULL(
Te
mpdir), NULL);
+ fpout = m_tempfile (pk7out, sizeof(tmpfname), NONULL(
MCore.t
mpdir), NULL);
if (!fpout) {
m_fclose(&fperr);
mutt_perror (pk7out);
if (!fpout) {
m_fclose(&fperr);
mutt_perror (pk7out);
@@
-906,7
+906,7
@@
static char *smime_extract_certificate (char *infile)
return NULL;
}
return NULL;
}
- fpout = m_tempfile (certfile, sizeof(certfile), NONULL(
Te
mpdir), NULL);
+ fpout = m_tempfile (certfile, sizeof(certfile), NONULL(
MCore.t
mpdir), NULL);
if (!fpout) {
m_fclose(&fperr);
mutt_unlink (pk7out);
if (!fpout) {
m_fclose(&fperr);
mutt_unlink (pk7out);
@@
-960,14
+960,14
@@
static char *smime_extract_signer_certificate (char *infile)
pid_t thepid;
int empty;
pid_t thepid;
int empty;
- fperr = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
Te
mpdir), NULL);
+ fperr = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
MCore.t
mpdir), NULL);
if (!fperr) {
mutt_perror (tmpfname);
return NULL;
}
mutt_unlink (tmpfname);
if (!fperr) {
mutt_perror (tmpfname);
return NULL;
}
mutt_unlink (tmpfname);
- m_tempfile (certfile, sizeof(certfile), NONULL(
Te
mpdir), NULL);
+ m_tempfile (certfile, sizeof(certfile), NONULL(
MCore.t
mpdir), NULL);
if (!fpout) {
m_fclose(&fperr);
mutt_perror (certfile);
if (!fpout) {
m_fclose(&fperr);
mutt_perror (certfile);
@@
-1020,14
+1020,14
@@
void smime_invoke_import (char *infile, char *mailbox __attribute__ ((unused)))
FILE *smimein = NULL, *fpout = NULL, *fperr = NULL;
pid_t thepid = -1;
FILE *smimein = NULL, *fpout = NULL, *fperr = NULL;
pid_t thepid = -1;
- fperr = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
Te
mpdir), NULL);
+ fperr = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
MCore.t
mpdir), NULL);
if (!fperr) {
mutt_perror (tmpfname);
return;
}
mutt_unlink (tmpfname);
if (!fperr) {
mutt_perror (tmpfname);
return;
}
mutt_unlink (tmpfname);
- fpout = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
Te
mpdir), NULL);
+ fpout = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
MCore.t
mpdir), NULL);
if (!fpout) {
m_fclose(&fperr);
mutt_perror (tmpfname);
if (!fpout) {
m_fclose(&fperr);
mutt_perror (tmpfname);
@@
-1078,7
+1078,7
@@
int smime_verify_sender (HEADER * h)
FILE *fpout;
int retval = 1;
FILE *fpout;
int retval = 1;
- fpout = m_tempfile (tempfname, sizeof(tempfname), NONULL(
Te
mpdir), NULL);
+ fpout = m_tempfile (tempfname, sizeof(tempfname), NONULL(
MCore.t
mpdir), NULL);
if (!fpout) {
mutt_perror (_("Can't create temporary file"));
return 1;
if (!fpout) {
mutt_perror (_("Can't create temporary file"));
return 1;
@@
-1178,13
+1178,13
@@
BODY *smime_build_smime_entity (BODY * a, char *certlist)
int err = 0, empty;
pid_t thepid;
int err = 0, empty;
pid_t thepid;
- fpout = m_tempfile (tempfile, sizeof(tempfile), NONULL(
Te
mpdir), NULL);
+ fpout = m_tempfile (tempfile, sizeof(tempfile), NONULL(
MCore.t
mpdir), NULL);
if (!fpout) {
mutt_perror (_("Can't create temporary file"));
return NULL;
}
if (!fpout) {
mutt_perror (_("Can't create temporary file"));
return NULL;
}
- smimeerr = m_tempfile (smimeerrfile, sizeof(smimeerrfile), NONULL(
Te
mpdir), NULL);
+ smimeerr = m_tempfile (smimeerrfile, sizeof(smimeerrfile), NONULL(
MCore.t
mpdir), NULL);
if (!smimeerr) {
mutt_perror (smimeerrfile);
m_fclose(&fpout);
if (!smimeerr) {
mutt_perror (smimeerrfile);
m_fclose(&fpout);
@@
-1193,7
+1193,7
@@
BODY *smime_build_smime_entity (BODY * a, char *certlist)
}
mutt_unlink (smimeerrfile);
}
mutt_unlink (smimeerrfile);
- fptmp = m_tempfile (smimeinfile, sizeof(smimeinfile), NONULL(
Te
mpdir), NULL);
+ fptmp = m_tempfile (smimeinfile, sizeof(smimeinfile), NONULL(
MCore.t
mpdir), NULL);
if (!fptmp) {
mutt_perror (smimeinfile);
mutt_unlink (tempfile);
if (!fptmp) {
mutt_perror (smimeinfile);
mutt_unlink (tempfile);
@@
-1303,13
+1303,13
@@
BODY *smime_sign_message (BODY * a)
convert_to_7bit (a); /* Signed data _must_ be in 7-bit format. */
convert_to_7bit (a); /* Signed data _must_ be in 7-bit format. */
- sfp = m_tempfile (filetosign, sizeof(filetosign), NONULL(
Te
mpdir), NULL);
+ sfp = m_tempfile (filetosign, sizeof(filetosign), NONULL(
MCore.t
mpdir), NULL);
if (!sfp) {
mutt_perror (filetosign);
return NULL;
}
if (!sfp) {
mutt_perror (filetosign);
return NULL;
}
- smimeout = m_tempfile (signedfile, sizeof(signedfile), NONULL(
Te
mpdir), NULL);
+ smimeout = m_tempfile (signedfile, sizeof(signedfile), NONULL(
MCore.t
mpdir), NULL);
if (!smimeout) {
mutt_perror (signedfile);
m_fclose(&sfp);
if (!smimeout) {
mutt_perror (signedfile);
m_fclose(&sfp);
@@
-1492,7
+1492,7
@@
int smime_verify_one (BODY * sigbdy, STATE * s, const char *tempfile)
sigbdy->type = origType;
sigbdy->type = origType;
- smimeerr = m_tempfile(smimeerrfile, sizeof(smimeerrfile), NONULL(
Te
mpdir), NULL);
+ smimeerr = m_tempfile(smimeerrfile, sizeof(smimeerrfile), NONULL(
MCore.t
mpdir), NULL);
if (!smimeerr) {
mutt_perror (smimeerrfile);
mutt_unlink (signedfile);
if (!smimeerr) {
mutt_perror (smimeerrfile);
mutt_unlink (signedfile);
@@
-1573,13
+1573,13
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
if (!(type & APPLICATION_SMIME))
return NULL;
if (!(type & APPLICATION_SMIME))
return NULL;
- smimeout = m_tempfile (outfile, sizeof(outfile), NONULL(
Te
mpdir), NULL);
+ smimeout = m_tempfile (outfile, sizeof(outfile), NONULL(
MCore.t
mpdir), NULL);
if (!smimeout) {
mutt_perror (outfile);
return NULL;
}
if (!smimeout) {
mutt_perror (outfile);
return NULL;
}
- smimeerr = m_tempfile(errfile, sizeof(errfile), NONULL(
Te
mpdir), NULL);
+ smimeerr = m_tempfile(errfile, sizeof(errfile), NONULL(
MCore.t
mpdir), NULL);
if (!smimeerr) {
mutt_perror (errfile);
m_fclose(&smimeout);
if (!smimeerr) {
mutt_perror (errfile);
m_fclose(&smimeout);
@@
-1587,7
+1587,7
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
}
mutt_unlink (errfile);
}
mutt_unlink (errfile);
- tmpfp = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
Te
mpdir), NULL);
+ tmpfp = m_tempfile (tmpfname, sizeof(tmpfname), NONULL(
MCore.t
mpdir), NULL);
if (!tmpfp) {
mutt_perror (tmpfname);
m_fclose(&smimeout);
if (!tmpfp) {
mutt_perror (tmpfname);
m_fclose(&smimeout);
@@
-1663,7
+1663,7
@@
static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
if (outFile)
fpout = outFile;
else {
if (outFile)
fpout = outFile;
else {
- fpout = m_tempfile (tmptmpfname, sizeof(tmptmpfname), NONULL(
Te
mpdir), NULL);
+ fpout = m_tempfile (tmptmpfname, sizeof(tmptmpfname), NONULL(
MCore.t
mpdir), NULL);
if (!fpout) {
mutt_perror (tmptmpfname);
m_fclose(&smimeout);
if (!fpout) {
mutt_perror (tmptmpfname);
m_fclose(&smimeout);
@@
-1760,7
+1760,7
@@
int smime_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, BODY ** cur)
s.fpin = fpin;
fseeko (s.fpin, b->offset, 0);
s.fpin = fpin;
fseeko (s.fpin, b->offset, 0);
- tmpfp = m_tempfile (tempfile, sizeof(tempfile), NONULL(
Te
mpdir), NULL);
+ tmpfp = m_tempfile (tempfile, sizeof(tempfile), NONULL(
MCore.t
mpdir), NULL);
if (!tmpfp) {
mutt_perror (_("Can't create temporary file"));
return (-1);
if (!tmpfp) {
mutt_perror (_("Can't create temporary file"));
return (-1);
@@
-1776,7
+1776,7
@@
int smime_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, BODY ** cur)
s.fpin = tmpfp;
s.fpout = 0;
s.fpin = tmpfp;
s.fpout = 0;
- *fpout = m_tempfile (tempfile, sizeof(tempfile), NONULL(
Te
mpdir), NULL);
+ *fpout = m_tempfile (tempfile, sizeof(tempfile), NONULL(
MCore.t
mpdir), NULL);
if (!*fpout) {
mutt_perror (_("Can't create temporary file"));
rv = -1;
if (!*fpout) {
mutt_perror (_("Can't create temporary file"));
rv = -1;