Skip to content

Commit

Permalink
lib/openssl/hmac.c: rename hmac function to jhmac (#130)
Browse files Browse the repository at this point in the history
Avoid conflict with stdlib hmac(3) on NetBSD.
  • Loading branch information
nikkicoon authored May 30, 2023
1 parent b72f8ca commit 33b9e0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/openssl/hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ver_done(jose_io_t *io)
}

static HMAC_CTX *
hmac(const jose_hook_alg_t *alg, jose_cfg_t *cfg,
jhmac(const jose_hook_alg_t *alg, jose_cfg_t *cfg,
const json_t *sig, const json_t *jwk)
{
uint8_t key[KEYMAX] = {};
Expand Down Expand Up @@ -251,7 +251,7 @@ alg_sign_sig(const jose_hook_alg_t *alg, jose_cfg_t *cfg, json_t *jws,

i->obj = json_incref(jws);
i->sig = json_incref(sig);
i->hctx = hmac(alg, cfg, sig, jwk);
i->hctx = jhmac(alg, cfg, sig, jwk);
if (!i->obj || !i->sig || !i->hctx)
return NULL;

Expand All @@ -275,7 +275,7 @@ alg_sign_ver(const jose_hook_alg_t *alg, jose_cfg_t *cfg, const json_t *jws,
io->free = io_free;

i->sig = json_incref((json_t *) sig);
i->hctx = hmac(alg, cfg, sig, jwk);
i->hctx = jhmac(alg, cfg, sig, jwk);
if (!i->sig || !i->hctx)
return NULL;

Expand Down

0 comments on commit 33b9e0b

Please sign in to comment.