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

# nvme\_scan\_tls\_keys(2)

Iterate over TLS keys in a keyring

## NAME

nvme\_scan\_tls\_keys - Iterate over TLS keys in a keyring

## SYNOPSIS

**int nvme\_scan\_tls\_keys** **(const char \*keyring** *,* **nvme\_scan\_tls\_keys\_cb\_t cb** *,* **void \*data** *);*

## ARGUMENTS

- keyring

  Keyring holding TLS keys

- cb

  Callback function

- data

  Pointer for data to be passed to *cb*

## DESCRIPTION

Iterates *keyring* and call *cb* for each TLS key. When *keyring* is NULL the default '.nvme' keyring is used. A TLS key must be of type 'psk' and the description must be of the form 'NVMe\<0\|1\>\<R\|G\>0\<1\|2\> \<identity\>', otherwise it will be skipped during iteration.

## RETURN

Number of keys for which *cb* was called, or -1 with errno set on error.
