---
name: "libnvmf_scan_tls_keys-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnvmf_scan_tls_keys-libnvme3"
---

# libnvmf\_scan\_tls\_keys-libnvme3(2)

Iterate over TLS PSKs in a keyring

## NAME

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

## SYNOPSIS

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

## ARGUMENTS

- ctx

  struct libnvme\_global\_ctx object

- keyring

  Keyring holding TLS PSKs

- cb

  Callback function

- data

  Pointer for data to be passed to *cb*

## 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\<0\|1\>\<R\|G\>\<01\|02\> \<identity\>', otherwise it will be skipped during iteration.

## RETURN

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