Thanks to GCC 6 for pointing out that many of the necessary bits of
functionality were hanging around unused. (Why did earlier versions not
spot this?)
It looks like they never worked properly. I hereby deprecate them, and
intend to remove them in Catacomb 2.5.
\
/* --- Generic MAC interface --- */ \
\
\
/* --- Generic MAC interface --- */ \
\
-static const gmac_ops gkops; \
+static const gmac_ops gkops, gnkops, gsslkops; \
static const ghash_ops gops, gnops, gsslops; \
\
typedef struct gkctx { \
static const ghash_ops gops, gnops, gsslops; \
\
typedef struct gkctx { \
gkctx *gk = S_CREATE(gkctx); \
const octet *kk = k; \
assert(keysz(sz, pre##_nmackeysz) == sz); \
gkctx *gk = S_CREATE(gkctx); \
const octet *kk = k; \
assert(keysz(sz, pre##_nmackeysz) == sz); \
gk->gops = &gnops; \
pre##_nmacinit(&gk->k, kk, kk + PRE##_STATESZ); \
return (&gk->m); \
gk->gops = &gnops; \
pre##_nmacinit(&gk->k, kk, kk + PRE##_STATESZ); \
return (&gk->m); \
static gmac *gsslkey(const void *k, size_t sz) \
{ \
gkctx *gk = S_CREATE(gkctx); \
static gmac *gsslkey(const void *k, size_t sz) \
{ \
gkctx *gk = S_CREATE(gkctx); \
+ gk->m.ops = &gsslkops; \
gk->gops = &gsslops; \
pre##_sslmacinit(&gk->k, k, sz); \
return (&gk->m); \
gk->gops = &gsslops; \
pre##_sslmacinit(&gk->k, k, sz); \
return (&gk->m); \
{ &gch, ghhash, ghdone, ghdestroy, ghcopy }; \
static const gchash gnch = { #pre "-nmac", PRE##_HASHSZ, ghinit }; \
static const ghash_ops gnops = \
{ &gch, ghhash, ghdone, ghdestroy, ghcopy }; \
static const gchash gnch = { #pre "-nmac", PRE##_HASHSZ, ghinit }; \
static const ghash_ops gnops = \
- { &gch, ghhash, ghdone, ghdestroy, ghcopy }; \
+ { &gnch, ghhash, ghdone, ghdestroy, ghcopy }; \
static const gchash gsslch = { #pre "-sslmac", PRE##_HASHSZ, ghinit }; \
static const ghash_ops gsslops = \
static const gchash gsslch = { #pre "-sslmac", PRE##_HASHSZ, ghinit }; \
static const ghash_ops gsslops = \
- { &gch, ghhash, ghdone, ghdestroy, ghcopy }; \
+ { &gsslch, ghhash, ghdone, ghdestroy, ghcopy }; \