---
name: "libnvmf_lookup_key-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_lookup_key-libnvme3"
---

# libnvmf\_lookup\_key-libnvme3(2)

Lookup key serial number

## NAME

libnvmf\_lookup\_key - Lookup key serial number

## SYNOPSIS

**int libnvmf\_lookup\_key** **(struct libnvme\_global\_ctx \*ctx** *,* **const char \*type** *,* **const char \*identity** *,* **long \*key** *);*

## ARGUMENTS

- ctx

  struct libnvme\_global\_ctx object

- type

  Key type

- identity

  Key description

- key

  Key serial number to return

## DESCRIPTION

Looks up the serial number of the key *identity* with type *type* in the current session keyring.

## RETURN

0 on success, negative error code otherwise.
