---
name: "libnvmf_context_set_crypto-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_context_set_crypto-libnvme3"
---

# libnvmf\_context\_set\_crypto-libnvme3(2)

Set cryptographic parameters for context

## NAME

libnvmf\_context\_set\_crypto - Set cryptographic parameters for context

## SYNOPSIS

**int libnvmf\_context\_set\_crypto** **(struct libnvmf\_context \*fctx** *,* **const char \*hostkey** *,* **const char \*ctrlkey** *,* **const char \*keyring** *,* **const char \*tls\_key** *,* **const char \*tls\_key\_identity** *);*

## ARGUMENTS

- fctx

  Fabrics context

- hostkey

  Host key

- ctrlkey

  Controller key

- keyring

  Keyring identifier

- tls\_key

  TLS key

- tls\_key\_identity

  TLS key identity

## DESCRIPTION

Sets cryptographic and TLS parameters for the context.

## RETURN

0 on success, negative error code otherwise.
