X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/3eda76a3c2766af9b7ab425b586a5daf79dc4971..8276a9c565bc29afbc6cc120dfde0801c06c2bbd:/symm/hmac-def.h diff --git a/symm/hmac-def.h b/symm/hmac-def.h index e639b8cb..72bd126a 100644 --- a/symm/hmac-def.h +++ b/symm/hmac-def.h @@ -232,7 +232,7 @@ void pre##_macdone(pre##_macctx *ctx, void *mac) \ \ /* --- 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 { \ @@ -270,7 +270,7 @@ static gmac *gnkey(const void *k, size_t sz) \ gkctx *gk = S_CREATE(gkctx); \ const octet *kk = k; \ assert(keysz(sz, pre##_nmackeysz) == sz); \ - gk->m.ops = &gkops; \ + gk->m.ops = &gnkops; \ gk->gops = &gnops; \ pre##_nmacinit(&gk->k, kk, kk + PRE##_STATESZ); \ return (&gk->m); \ @@ -279,7 +279,7 @@ static gmac *gnkey(const void *k, size_t sz) \ static gmac *gsslkey(const void *k, size_t sz) \ { \ gkctx *gk = S_CREATE(gkctx); \ - gk->m.ops = &gkops; \ + gk->m.ops = &gsslkops; \ gk->gops = &gsslops; \ pre##_sslmacinit(&gk->k, k, sz); \ return (&gk->m); \ @@ -342,10 +342,10 @@ static const ghash_ops gops = \ { &gch, ghhash, ghdone, ghdestroy, ghcopy }; \ static const gchash gnch = { name "-nmac", PRE##_HASHSZ, ghinit }; \ static const ghash_ops gnops = \ - { &gch, ghhash, ghdone, ghdestroy, ghcopy }; \ + { &gnch, ghhash, ghdone, ghdestroy, ghcopy }; \ static const gchash gsslch = { name "-sslmac", PRE##_HASHSZ, ghinit }; \ static const ghash_ops gsslops = \ - { &gch, ghhash, ghdone, ghdestroy, ghcopy }; \ + { &gsslch, ghhash, ghdone, ghdestroy, ghcopy }; \ \ HMAC_TESTX(PRE, pre, name, fname)