.TH "libnvmf_insert_tls_key_compat" 9 "libnvmf_insert_tls_key_compat" "October 2026" "libnvme API manual" LINUX .SH NAME libnvmf_insert_tls_key_compat \- Derive and insert a TLS PSK .SH SYNOPSIS .B "int" libnvmf_insert_tls_key_compat .BI "(struct libnvme_global_ctx *ctx " "," .BI "const char *keyring " "," .BI "const char *key_type " "," .BI "const char *hostnqn " "," .BI "const char *subsysnqn " "," .BI "int version " "," .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 "version" 12 TLS PSK identity version to use .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 as specified in the NVMe TCP Transport Specification 1.3, section 3.6.1.3. Stores the TLS PSK as type \fIkey_type\fP under that identity in the keyring specified by \fIkeyring\fP. This function differs from \fBlibnvmf_insert_tls_key_versioned\fP in that it uses the original implementation for HKDF Expand-Label which does not prefix the 'info' and 'label' strings with the length. \fIversion\fP selects the identity version: 0 is obsolete and defined in the NVMe TCP Transport Specification 1.0, 1 is TLS 1.3 with the PSK digest in the identity. .SH "RETURN" 0 on success, negative error code otherwise.