libnvmf\_scan\_tls\_keys(9) libnvme API manual libnvmf\_scan\_tls\_keys(9)

# [NAME](#NAME)

libnvmf\_scan\_tls\_keys - Iterate over TLS PSKs in a keyring

# [SYNOPSIS](#SYNOPSIS)

**int libnvmf\_scan\_tls\_keys** **(struct libnvme\_global\_ctx \*ctx ,** **const char \*keyring ,** **libnvmf\_scan\_tls\_keys\_cb\_t cb ,** **void \*data );**

# [ARGUMENTS](#ARGUMENTS)

[ctx](#ctx)

struct libnvme\_global\_ctx object

[keyring](#keyring)

Keyring holding TLS PSKs

[cb](#cb)

Callback function

[data](#data)

Pointer for data to be passed to *cb*

# [DESCRIPTION](#DESCRIPTION)

Iterates *keyring* and call *cb* for each TLS PSK. When *keyring* is NULL the default '.nvme' keyring is used. A key holding a TLS PSK must be of type 'psk' and its description must be of the form 'NVMe&lt;0|1&gt;&lt;R|G&gt;&lt;01|02&gt; &lt;identity&gt;', otherwise it will be skipped during iteration.

# [RETURN](#RETURN)

Number of keys for which *cb* was called, or negative error code

libnvmf\_scan\_tls\_keys October 2026

---

Document: libnvmf_scan_tls_keys-libnvme3(2) from nvme-cli 3.2-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
