libnvmf\_update\_key(9) libnvme API manual libnvmf\_update\_key(9)

# [NAME](#NAME)

libnvmf\_update\_key - Update key raw data

# [SYNOPSIS](#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](#ARGUMENTS)

[ctx](#ctx)

struct libnvme\_global\_ctx object

[keyring\_id](#keyring_id)

Id of the keyring holding *key\_id*

[key\_type](#key_type)

Type of the key to insert

[identity](#identity)

Key identity string

[key\_data](#key_data)

Raw data of the key

[key\_len](#key_len)

Length of *key\_data*

[key](#key)

Key serial to return

# [DESCRIPTION](#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](#RETURN)

0 on success, negative error code otherwise.

libnvmf\_update\_key October 2026

---

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