Scroll to navigation

libnvmf_export_tls_key_versioned(2) libnvme API manual libnvmf_export_tls_key_versioned(2)

NAME

libnvmf_export_tls_key_versioned - Encode a PSK in the PSK interchange format

SYNOPSIS

int libnvmf_export_tls_key_versioned (struct libnvme_global_ctx *ctx , unsigned char version , enum libnvmf_hmac_alg hmac , const unsigned char *key_data , size_t key_len , char **encoded_keyp );

ARGUMENTS

struct libnvme_global_ctx object
Version of the PSK interchange format to write. The specification defines 1, which appears in the encoded string as the digit after "NVMeTLSkey-".
Hash function recorded in the encoded PSK, used to derive a retained PSK from a configured PSK
Raw PSK data
Length of key_data
Encoded PSK to return

DESCRIPTION

Returns key_data in the PSK Interchange format as defined in section 3.6.1.5 of the NVMe TCP Transport Specification 1.3.

It is the responsibility of the caller to free the returned string.

RETURN

0 on success, negative error code otherwise.

libnvmf_export_tls_key_versioned October 2026