---
name: "nvme_generate_tls_key_identity"
section: "2"
platform: "linux"
package: "libnvme-dev"
version: "1.13-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_generate_tls_key_identity"
---

# nvme\_generate\_tls\_key\_identity(2)

Generate the TLS key identity

## NAME

nvme\_generate\_tls\_key\_identity - Generate the TLS key identity

## SYNOPSIS

**char \* nvme\_generate\_tls\_key\_identity** **(const char \*hostnqn** *,* **const char \*subsysnqn** *,* **int version** *,* **int hmac** *,* **unsigned char \*configured\_key** *,* **int key\_len** *);*

## ARGUMENTS

- hostnqn

  Host NVMe Qualified Name

- subsysnqn

  Subsystem NVMe Qualified Name

- version

  Key version to use

- hmac

  HMAC algorithm

- configured\_key

  Configured key data to derive the key from

- key\_len

  Length of *configured\_key*

## DESCRIPTION

Derives a 'retained' TLS key as specified in NVMe TCP and generate the corresponding TLs identity.

## RETURN

The string containing the TLS identity. It is the responsibility of the caller to free the returned string.
