Home
last modified time | relevance | path

Searched refs:dhchap_secret (Results 1 – 7 of 7) sorted by relevance

/linux-6.1.9/drivers/nvme/target/
Dauth.c26 char *dhchap_secret; in nvmet_auth_set_key() local
44 dhchap_secret = kstrdup(secret, GFP_KERNEL); in nvmet_auth_set_key()
45 if (!dhchap_secret) in nvmet_auth_set_key()
49 host->dhchap_ctrl_secret = strim(dhchap_secret); in nvmet_auth_set_key()
52 kfree(host->dhchap_secret); in nvmet_auth_set_key()
53 host->dhchap_secret = strim(dhchap_secret); in nvmet_auth_set_key()
158 if (!host->dhchap_secret) { in nvmet_setup_auth()
178 ctrl->host_key = nvme_auth_extract_key(host->dhchap_secret + 10, in nvmet_setup_auth()
Dconfigfs.c1720 u8 *dhchap_secret = to_host(item)->dhchap_secret; in nvmet_host_dhchap_key_show() local
1722 if (!dhchap_secret) in nvmet_host_dhchap_key_show()
1724 return sprintf(page, "%s\n", dhchap_secret); in nvmet_host_dhchap_key_show()
1747 u8 *dhchap_secret = to_host(item)->dhchap_ctrl_secret; in nvmet_host_dhchap_ctrl_key_show() local
1749 if (!dhchap_secret) in nvmet_host_dhchap_ctrl_key_show()
1751 return sprintf(page, "%s\n", dhchap_secret); in nvmet_host_dhchap_ctrl_key_show()
1841 kfree(host->dhchap_secret); in nvmet_host_release()
Dnvmet.h295 u8 *dhchap_secret; member
/linux-6.1.9/drivers/nvme/host/
Dcore.c3743 if (!opts->dhchap_secret) in nvme_ctrl_dhchap_secret_show()
3745 return sysfs_emit(buf, "%s\n", opts->dhchap_secret); in nvme_ctrl_dhchap_secret_show()
3753 char *dhchap_secret; in nvme_ctrl_dhchap_secret_store() local
3755 if (!ctrl->opts->dhchap_secret) in nvme_ctrl_dhchap_secret_store()
3762 dhchap_secret = kzalloc(count + 1, GFP_KERNEL); in nvme_ctrl_dhchap_secret_store()
3763 if (!dhchap_secret) in nvme_ctrl_dhchap_secret_store()
3765 memcpy(dhchap_secret, buf, count); in nvme_ctrl_dhchap_secret_store()
3767 if (strcmp(dhchap_secret, opts->dhchap_secret)) { in nvme_ctrl_dhchap_secret_store()
3771 ret = nvme_auth_generate_key(dhchap_secret, &key); in nvme_ctrl_dhchap_secret_store()
3774 kfree(opts->dhchap_secret); in nvme_ctrl_dhchap_secret_store()
[all …]
Dfabrics.h129 char *dhchap_secret; member
Dfabrics.c889 kfree(opts->dhchap_secret); in nvmf_parse_options()
890 opts->dhchap_secret = p; in nvmf_parse_options()
1037 kfree(opts->dhchap_secret); in nvmf_free_options()
Dauth.c980 nvme_auth_generate_key(ctrl->opts->dhchap_secret, &ctrl->host_key); in nvme_auth_init_ctrl()