Changeset View
Changeset View
Standalone View
Standalone View
sys/crypto/ccp/ccp_hardware.c
Show First 20 Lines • Show All 1,206 Lines • ▼ Show 20 Lines | ccp_do_hmac_done(struct ccp_queue *qp, struct ccp_session *s, | ||||
char ihash[SHA2_512_HASH_LEN /* max hash len */]; | char ihash[SHA2_512_HASH_LEN /* max hash len */]; | ||||
union authctx auth_ctx; | union authctx auth_ctx; | ||||
const struct auth_hash *axf; | const struct auth_hash *axf; | ||||
axf = s->hmac.auth_hash; | axf = s->hmac.auth_hash; | ||||
s->pending--; | s->pending--; | ||||
if (error != 0) { | if (error != 0 || (crp->crp_op & CRYPTO_OP_SKIP_DIGEST) != 0) { | ||||
crp->crp_etype = error; | crp->crp_etype = error; | ||||
goto out; | goto out; | ||||
} | } | ||||
/* Do remaining outer hash over small inner hash in software */ | /* Do remaining outer hash over small inner hash in software */ | ||||
axf->Init(&auth_ctx); | axf->Init(&auth_ctx); | ||||
axf->Update(&auth_ctx, s->hmac.opad, axf->blocksize); | axf->Update(&auth_ctx, s->hmac.opad, axf->blocksize); | ||||
ccp_sha_copy_result(ihash, s->hmac.res, s->hmac.auth_mode); | ccp_sha_copy_result(ihash, s->hmac.res, s->hmac.auth_mode); | ||||
▲ Show 20 Lines • Show All 883 Lines • Show Last 20 Lines |