Lines Matching refs:shash_tfm
20 struct crypto_shash *shash_tfm; member
164 if (chap->hash_id == data->hashid && chap->shash_tfm && in nvme_auth_process_dhchap_challenge()
165 !strcmp(crypto_shash_alg_name(chap->shash_tfm), hmac_name) && in nvme_auth_process_dhchap_challenge()
166 crypto_shash_digestsize(chap->shash_tfm) == data->hl) { in nvme_auth_process_dhchap_challenge()
174 if (chap->shash_tfm) { in nvme_auth_process_dhchap_challenge()
175 crypto_free_shash(chap->shash_tfm); in nvme_auth_process_dhchap_challenge()
179 chap->shash_tfm = crypto_alloc_shash(hmac_name, 0, in nvme_auth_process_dhchap_challenge()
181 if (IS_ERR(chap->shash_tfm)) { in nvme_auth_process_dhchap_challenge()
184 chap->qid, hmac_name, PTR_ERR(chap->shash_tfm)); in nvme_auth_process_dhchap_challenge()
185 chap->shash_tfm = NULL; in nvme_auth_process_dhchap_challenge()
190 if (crypto_shash_digestsize(chap->shash_tfm) != data->hl) { in nvme_auth_process_dhchap_challenge()
194 crypto_free_shash(chap->shash_tfm); in nvme_auth_process_dhchap_challenge()
195 chap->shash_tfm = NULL; in nvme_auth_process_dhchap_challenge()
427 SHASH_DESC_ON_STACK(shash, chap->shash_tfm); in nvme_auth_dhchap_setup_host_response()
447 ret = crypto_shash_setkey(chap->shash_tfm, in nvme_auth_dhchap_setup_host_response()
470 shash->tfm = chap->shash_tfm; in nvme_auth_dhchap_setup_host_response()
513 SHASH_DESC_ON_STACK(shash, chap->shash_tfm); in nvme_auth_dhchap_setup_ctrl_response()
524 ret = crypto_shash_setkey(chap->shash_tfm, in nvme_auth_dhchap_setup_ctrl_response()
554 shash->tfm = chap->shash_tfm; in nvme_auth_dhchap_setup_ctrl_response()
682 if (chap->shash_tfm) in __nvme_auth_free()
683 crypto_free_shash(chap->shash_tfm); in __nvme_auth_free()