.TH "libnvmf_insert_tls_key" 9 "libnvmf_insert_tls_key" "October 2026" "libnvme API manual" LINUX .SH NAME libnvmf_insert_tls_key \- Derive and insert a TLS PSK .SH SYNOPSIS .B "int" libnvmf_insert_tls_key .BI "(struct libnvme_global_ctx *ctx " "," .BI "const char *keyring " "," .BI "const char *key_type " "," .BI "const char *hostnqn " "," .BI "const char *subsysnqn " "," .BI "enum libnvmf_hmac_alg hmac " "," .BI "unsigned char *configured_key " "," .BI "int key_len " "," .BI "long *key " ");" .SH ARGUMENTS .IP "ctx" 12 struct libnvme_global_ctx object .IP "keyring" 12 Keyring to use .IP "key_type" 12 Type of the resulting key .IP "hostnqn" 12 Host NVMe Qualified Name .IP "subsysnqn" 12 Subsystem NVMe Qualified Name .IP "hmac" 12 HMAC algorithm .IP "configured_key" 12 Configured PSK to derive the retained PSK from .IP "key_len" 12 Length of \fIconfigured_key\fP .IP "key" 12 Key serial to return .SH "DESCRIPTION" Derives a retained PSK from \fIconfigured_key\fP and, from that, the TLS PSK and its identity, using identity version 0, as specified in the NVMe TCP Transport Specification 1.0, section 3.6.1.3. Stores the TLS PSK as type \fIkey_type\fP under that identity in the keyring specified by \fIkeyring\fP. The NVMe TCP Transport Specification 1.3 marks identity version 0 obsolete. Use \fBlibnvmf_insert_tls_key_versioned\fP to select the identity version. .SH "RETURN" 0 on success, negative error code otherwise.