* (c) 2005 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Catacomb.
*
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
- *
+ *
* Catacomb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Library General Public
* License along with Catacomb; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
if (m->fp && !(m->f & F_NOCLOSE)) {
if (ferror(m->fp) || fclose(m->fp))
die(EXIT_FAILURE, "error closing message file: %s", strerror(errno));
- }
+ }
}
static void mc_endwrite(msgcanon *m, const encops *eops, enc **ee)
if (m->fp && !(m->f & F_NOCLOSE)) {
if (fflush(m->fp) || ferror(m->fp) || fclose(m->fp))
die(EXIT_FAILURE, "error closing message file: %s", strerror(errno));
- }
+ }
}
/*----- Signature reading and writing -------------------------------------*/
ghash *h;
key_filter kf;
- h = GH_INIT(GH_CLASS(s->h));
+ h = GH_INIT(s->ch);
kf.f = KCAT_PUB;
kf.m = KF_CATMASK;
key_fingerprint(k, h, &kf);
int i;
char bb[MSGBUFSZ];
size_t n;
- dstr d = DSTR_INIT;
+ dstr d = DSTR_INIT;
const encops *eo;
msgcanon mc_in = MC_INIT, mc_out = MC_INIT;
enc *e;
case 'C': v.f |= F_NOCHECK; break;
case 't':
if (strcmp(optarg, "always") == 0) t_fresh = 0;
- else if ((t_fresh = get_date(optarg, 0)) < 0)
+ else if ((t_fresh = get_date(optarg, 0)) < 0)
die(EXIT_FAILURE, "bad freshness time");
break;
case 'q': if (v.verb > 0) v.verb--; break;
if (dd.len != s.kh.len || memcmp(dd.buf, s.kh.buf, dd.len) != 0) {
if (v.verb) printf("FAIL key hash mismatch\n");
exit(EXIT_FAILURE);
- }
+ }
/* --- Now a merry dance --- */
die(EXIT_FAILURE, "error unbuffering output: %s", strerror(errno));
}
if (ofp && (fflush(ofp) || ferror(ofp) || fclose(ofp)))
- die(EXIT_FAILURE, "error writing output: %s", strerror(errno));
+ die(EXIT_FAILURE, "error writing output: %s", strerror(errno));
/* --- Tidy up --- */
sig_destroy(&s);
dstr_destroy(&d);
dstr_destroy(&dd);
- return (0);
+ return (0);
}
/*----- Reformatting ------------------------------------------------------*/
{ "embed", 0, 0, 'E' },
{ "format-in", OPTF_ARGREQ, 0, 'f' },
{ "format-out", OPTF_ARGREQ, 0, 'F' },
- { "message", OPTF_ARGREQ, 0, 'm' },
- { "output", OPTF_ARGREQ, 0, 'o' },
+ { "message", OPTF_ARGREQ, 0, 'm' },
+ { "output", OPTF_ARGREQ, 0, 'o' },
{ 0, 0, 0, 0 }
};
i = mdwopt(argc, argv, "f:F:m:o:aADE", opt, 0, 0, 0);
if (((s.f ^ v.f) & v.m) != 0)
moan("boundary string inconsistent with contents (ignoring)");
-
+
mcsetup_read(&mc_in, s.f, &ie, dfn);
/* --- Prepare the output stuff --- */