const char *name)
{
DIR *d;
- char *host_key;
+ char *host_key, *tls_psk;
d = opendir(path);
if (!d) {
free(c->dhchap_ctrl_key);
c->dhchap_ctrl_key = NULL;
}
+ tls_psk = nvme_get_ctrl_attr(c, "tls_key");
+ if (tls_psk) {
+ char *endptr;
+ long key_id = strtol(tls_psk, &endptr, 16);
+
+ if (endptr != tls_psk) {
+ c->cfg.tls_key = key_id;
+ c->cfg.tls = true;
+ }
+ }
c->cntrltype = nvme_get_ctrl_attr(c, "cntrltype");
c->dctype = nvme_get_ctrl_attr(c, "dctype");
c->phy_slot = nvme_ctrl_lookup_phy_slot(r, c->address);