X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/9cea6911b24ae552b8804048d093490405ed0b69..213e565ffaaa420441d7a8d25f995358c5f9f30f:/catcrypt.c diff --git a/catcrypt.c b/catcrypt.c index 4c343a4..bbe4660 100644 --- a/catcrypt.c +++ b/catcrypt.c @@ -55,23 +55,6 @@ /*----- Utilities ---------------------------------------------------------*/ -/* --- @keyreport@ --- * - * - * Arguments: @const char *file@ = filename containing the error - * @int line@ = line number in file - * @const char *err@ = error text message - * @void *p@ = unimportant pointer - * - * Returns: --- - * - * Use: Reports errors during the opening of a key file. - */ - -static void keyreport(const char *file, int line, const char *err, void *p) -{ - moan("error in keyring `%s' at line `%s': %s", file, line, err); -} - /*----- Static variables --------------------------------------------------*/ static const char *keyring = "keyring"; @@ -195,7 +178,7 @@ static int encrypt(int argc, char *argv[]) if (argc - optind > 1 || (f & f_bogus)) die(EXIT_FAILURE, "Usage: encrypt [-OPTIONS] [FILE]"); - if (key_open(&kf, keyring, KOPEN_READ, keyreport, 0)) + if (key_open(&kf, keyring, KOPEN_READ, key_moan, 0)) die(EXIT_FAILURE, "can't open keyring `%s'", keyring); if ((k = key_bytag(&kf, kn)) == 0) die(EXIT_FAILURE, "key `%s' not found", kn); @@ -395,7 +378,7 @@ static int decrypt(int argc, char *argv[]) } else optind++; - if (key_open(&kf, keyring, KOPEN_READ, keyreport, 0)) + if (key_open(&kf, keyring, KOPEN_READ, key_moan, 0)) die(EXIT_FAILURE, "can't open keyring `%s'", keyring); e = initdec(eo, fp, checkbdry, "CATCRYPT ENCRYPTED MESSAGE");