~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
base/ct.[ch]: Set the return type of `ct_pick' correctly.
[catacomb]
/
progs
/
catcrypt.c
diff --git
a/progs/catcrypt.c
b/progs/catcrypt.c
index
72c7780
..
e4d974a
100644
(file)
--- a/
progs/catcrypt.c
+++ b/
progs/catcrypt.c
@@
-38,6
+38,7
@@
#include <mLib/base64.h>
#include <mLib/dstr.h>
#include <mLib/base64.h>
#include <mLib/dstr.h>
+#include <mLib/macros.h>
#include <mLib/mdwopt.h>
#include <mLib/quis.h>
#include <mLib/report.h>
#include <mLib/mdwopt.h>
#include <mLib/quis.h>
#include <mLib/report.h>
@@
-51,6
+52,7
@@
#include "key.h"
#include "cc.h"
#include "key.h"
#include "cc.h"
+#include "gaead.h"
#include "ectab.h"
#include "ptab.h"
#include "ectab.h"
#include "ptab.h"
@@
-193,14
+195,14
@@
static int encrypt(int argc, char *argv[])
die(EXIT_FAILURE, "encoding `%s' not found", ef);
fn = optind < argc ? argv[optind++] : "-";
die(EXIT_FAILURE, "encoding `%s' not found", ef);
fn = optind < argc ? argv[optind++] : "-";
- if (
strcmp(fn, "-") == 0
)
+ if (
STRCMP(fn, ==, "-")
)
fp = stdin;
else if ((fp = fopen(fn, "rb")) == 0) {
die(EXIT_FAILURE, "couldn't open file `%s': %s",
fn, strerror(errno));
}
fp = stdin;
else if ((fp = fopen(fn, "rb")) == 0) {
die(EXIT_FAILURE, "couldn't open file `%s': %s",
fn, strerror(errno));
}
- if (!of ||
strcmp(of, "-") == 0
)
+ if (!of ||
STRCMP(of, ==, "-")
)
ofp = stdout;
else if ((ofp = fopen(of, eo->wmode)) == 0) {
die(EXIT_FAILURE, "couldn't open file `%s' for output: %s",
ofp = stdout;
else if ((ofp = fopen(of, eo->wmode)) == 0) {
die(EXIT_FAILURE, "couldn't open file `%s' for output: %s",
@@
-365,7
+367,7
@@
static int decrypt(int argc, char *argv[])
die(EXIT_FAILURE, "encoding `%s' not found", ef);
fn = optind < argc ? argv[optind++] : "-";
die(EXIT_FAILURE, "encoding `%s' not found", ef);
fn = optind < argc ? argv[optind++] : "-";
- if (
strcmp(fn, "-") == 0
)
+ if (
STRCMP(fn, ==, "-")
)
fp = stdin;
else if ((fp = fopen(fn, eo->rmode)) == 0) {
die(EXIT_FAILURE, "couldn't open file `%s': %s",
fp = stdin;
else if ((fp = fopen(fn, eo->rmode)) == 0) {
die(EXIT_FAILURE, "couldn't open file `%s': %s",
@@
-471,7
+473,7
@@
static int decrypt(int argc, char *argv[])
/* --- Now decrypt the main body --- */
/* --- Now decrypt the main body --- */
- if (!of ||
strcmp(of, "-") == 0
) {
+ if (!of ||
STRCMP(of, ==, "-")
) {
ofp = stdout;
f |= f_buffer;
}
ofp = stdout;
f |= f_buffer;
}
@@
-572,6
+574,8
@@
static int decrypt(int argc, char *argv[])
enctab[i].name, enctab[i].name) \
LI("Symmetric encryption algorithms", cipher, \
gciphertab[i], gciphertab[i]->name) \
enctab[i].name, enctab[i].name) \
LI("Symmetric encryption algorithms", cipher, \
gciphertab[i], gciphertab[i]->name) \
+ LI("Authenticated encryption schemes", aead, \
+ gaeadtab[i], gaeadtab[i]->name) \
LI("Hash functions", hash, \
ghashtab[i], ghashtab[i]->name) \
LI("Message authentication codes", mac, \
LI("Hash functions", hash, \
ghashtab[i], ghashtab[i]->name) \
LI("Message authentication codes", mac, \