Changeset View
Changeset View
Standalone View
Standalone View
sys/crypto/openssl/ossl.c
Show First 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | |||||
ossl_process_hash(struct ossl_session *s, struct cryptop *crp, | ossl_process_hash(struct ossl_session *s, struct cryptop *crp, | ||||
const struct crypto_session_params *csp) | const struct crypto_session_params *csp) | ||||
{ | { | ||||
struct ossl_hash_context ctx; | struct ossl_hash_context ctx; | ||||
char digest[HASH_MAX_LEN]; | char digest[HASH_MAX_LEN]; | ||||
struct auth_hash *axf; | struct auth_hash *axf; | ||||
int error; | int error; | ||||
if (crp->crp_op & CRYPTO_OP_SKIP_DIGEST) | |||||
return (0); | |||||
axf = s->hash.axf; | axf = s->hash.axf; | ||||
if (crp->crp_auth_key == NULL) { | if (crp->crp_auth_key == NULL) { | ||||
ctx = s->hash.ictx; | ctx = s->hash.ictx; | ||||
} else { | } else { | ||||
if (axf->Setkey != NULL) { | if (axf->Setkey != NULL) { | ||||
axf->Init(&ctx); | axf->Init(&ctx); | ||||
axf->Setkey(&ctx, crp->crp_auth_key, | axf->Setkey(&ctx, crp->crp_auth_key, | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |