~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
/
cc-sig.c
diff --git
a/progs/cc-sig.c
b/progs/cc-sig.c
index
fb5e1c3
..
4c1defc
100644
(file)
--- a/
progs/cc-sig.c
+++ b/
progs/cc-sig.c
@@
-31,12
+31,14
@@
#include <stdlib.h>
#include <stdlib.h>
+#include <mLib/macros.h>
#include <mLib/report.h>
#include "rand.h"
#include "sha.h"
#include "has160.h"
#include "sha512.h"
#include <mLib/report.h>
#include "rand.h"
#include "sha.h"
#include "has160.h"
#include "sha512.h"
+#include "sha3.h"
#include "ct.h"
#include "ec.h"
#include "ct.h"
#include "ec.h"
@@
-46,6
+48,7
@@
#include "gkcdsa.h"
#include "rsa.h"
#include "ed25519.h"
#include "gkcdsa.h"
#include "rsa.h"
#include "ed25519.h"
+#include "ed448.h"
#include "cc.h"
#include "cc.h"
@@
-577,7
+580,8
@@
static const sigops eckcdsa_vrf = {
/* --- EdDSA --- */
#define EDDSAS(_) \
/* --- EdDSA --- */
#define EDDSAS(_) \
- _(ed25519, ed25519ctx, ED25519, "Ed25519", sha512)
+ _(ed25519, ed25519ctx, ED25519, "Ed25519", sha512) \
+ _(ed448, ed448, ED448, "Ed448", shake256)
typedef struct eddsa_sigctx {
sig s;
typedef struct eddsa_sigctx {
sig s;
@@
-806,7
+810,7
@@
sig *getsig(key *k, const char *app, int wantpriv)
if ((q = key_getattr(0, k, "sig")) != 0) {
dstr_puts(&d, q);
p = d.buf;
if ((q = key_getattr(0, k, "sig")) != 0) {
dstr_puts(&d, q);
p = d.buf;
- } else if (
strncmp(k->type, app, n) == 0
&& k->type[n] == '-') {
+ } else if (
STRNCMP(k->type, ==, app, n)
&& k->type[n] == '-') {
dstr_puts(&d, k->type);
p = d.buf + n + 1;
} else
dstr_puts(&d, k->type);
p = d.buf + n + 1;
} else
@@
-829,7
+833,7
@@
sig *getsig(key *k, const char *app, int wantpriv)
/* --- Look up the algorithms in the table --- */
for (st = sigtab; st->name; st++) {
/* --- Look up the algorithms in the table --- */
for (st = sigtab; st->name; st++) {
- if (
strcmp(st->name, salg) == 0
)
+ if (
STRCMP(st->name, ==, salg)
)
goto s_found;
}
die(EXIT_FAILURE, "signature algorithm `%s' not found in key `%s'",
goto s_found;
}
die(EXIT_FAILURE, "signature algorithm `%s' not found in key `%s'",