Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/glxsb/glxsb_hash.c
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
glxsb_authcompute(struct glxsb_session *ses, struct cryptop *crp) | glxsb_authcompute(struct glxsb_session *ses, struct cryptop *crp) | ||||
{ | { | ||||
u_char hash[HASH_MAX_LEN]; | u_char hash[HASH_MAX_LEN]; | ||||
const struct auth_hash *axf; | const struct auth_hash *axf; | ||||
union authctx ctx; | union authctx ctx; | ||||
int error; | int error; | ||||
if (crp->crp_op & CRYPTO_OP_SKIP_DIGEST) | |||||
return (0); | |||||
axf = ses->ses_axf; | axf = ses->ses_axf; | ||||
bcopy(ses->ses_ictx, &ctx, axf->ctxsize); | bcopy(ses->ses_ictx, &ctx, axf->ctxsize); | ||||
error = crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, | error = crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, | ||||
axf->Update, &ctx); | axf->Update, &ctx); | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
error = crypto_apply(crp, crp->crp_payload_start, | error = crypto_apply(crp, crp->crp_payload_start, | ||||
crp->crp_payload_length, axf->Update, &ctx); | crp->crp_payload_length, axf->Update, &ctx); | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |