Home
last modified time | relevance | path

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

/openbmc/linux/drivers/nvme/host/
H A Dsysfs.c419 if (!opts->dhchap_secret) in nvme_ctrl_dhchap_secret_show()
421 return sysfs_emit(buf, "%s\n", opts->dhchap_secret); in nvme_ctrl_dhchap_secret_show()
429 char *dhchap_secret; in nvme_ctrl_dhchap_secret_store() local
431 if (!ctrl->opts->dhchap_secret) in nvme_ctrl_dhchap_secret_store()
438 dhchap_secret = kzalloc(count + 1, GFP_KERNEL); in nvme_ctrl_dhchap_secret_store()
439 if (!dhchap_secret) in nvme_ctrl_dhchap_secret_store()
441 memcpy(dhchap_secret, buf, count); in nvme_ctrl_dhchap_secret_store()
443 if (strcmp(dhchap_secret, opts->dhchap_secret)) { in nvme_ctrl_dhchap_secret_store()
447 ret = nvme_auth_generate_key(dhchap_secret, &key); in nvme_ctrl_dhchap_secret_store()
449 kfree(dhchap_secret); in nvme_ctrl_dhchap_secret_store()
[all …]
H A Dfabrics.h122 char *dhchap_secret; member
H A Dfabrics.c943 kfree(opts->dhchap_secret); in nvmf_parse_options()
944 opts->dhchap_secret = p; in nvmf_parse_options()
1167 kfree(opts->dhchap_secret); in nvmf_free_options()
H A Dauth.c950 ret = nvme_auth_generate_key(ctrl->opts->dhchap_secret, in nvme_auth_init_ctrl()
959 if (!ctrl->opts->dhchap_secret && !ctrl->opts->dhchap_ctrl_secret) in nvme_auth_init_ctrl()
/openbmc/linux/drivers/nvme/target/
H A 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()
159 if (!host->dhchap_secret) { in nvmet_setup_auth()
179 ctrl->host_key = nvme_auth_extract_key(host->dhchap_secret + 10, in nvmet_setup_auth()
H A Dconfigfs.c1863 u8 *dhchap_secret = to_host(item)->dhchap_secret; in nvmet_host_dhchap_key_show() local
1865 if (!dhchap_secret) in nvmet_host_dhchap_key_show()
1867 return sprintf(page, "%s\n", dhchap_secret); in nvmet_host_dhchap_key_show()
1890 u8 *dhchap_secret = to_host(item)->dhchap_ctrl_secret; in nvmet_host_dhchap_ctrl_key_show() local
1892 if (!dhchap_secret) in nvmet_host_dhchap_ctrl_key_show()
1894 return sprintf(page, "%s\n", dhchap_secret); in nvmet_host_dhchap_ctrl_key_show()
1984 kfree(host->dhchap_secret); in nvmet_host_release()
H A Dnvmet.h298 u8 *dhchap_secret; member