---
name: "libnvmf_update_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_update_key-libnvme3"
---

# libnvmf\_update\_key-libnvme3(2)

Update key raw data

## NAME

libnvmf\_update\_key - Update key raw data

## SYNOPSIS

**int libnvmf\_update\_key** **(struct libnvme\_global\_ctx \*ctx** *,* **long keyring\_id** *,* **const char \*key\_type** *,* **const char \*identity** *,* **unsigned char \*key\_data** *,* **int key\_len** *,* **long \*key** *);*

## ARGUMENTS

- ctx

  struct libnvme\_global\_ctx object

- keyring\_id

  Id of the keyring holding *key\_id*

- key\_type

  Type of the key to insert

- identity

  Key identity string

- key\_data

  Raw data of the key

- key\_len

  Length of *key\_data*

- key

  Key serial to return

## DESCRIPTION

Links the keyring specified by *keyring\_id* into the session keyring and updates the key reference by *identity* with *key\_data*. The old key with identity *identity* will be revoked to make it inaccessible.

## RETURN

0 on success, negative error code otherwise.
