libnvmf_insert_tls_key(9)
π libnvmf_insert_tls_key
okay so this is a page from the libnvme API manual, and bestie, it's about deriving a TLS PSK and shoving it into a keyring. Yes, actual crypto plumbing. You're gonna do great π«Ά
β¨ NAME β¨
libnvmf_insert_tls_key β derive and insert a TLS PSK. that's the whole vibe. derive it, insert it, done π
πΈ SYNOPSIS πΈ
int libnvmf_insert_tls_key (struct libnvme_global_ctx *ctx , const char
*keyring , const char *key_type , const char *hostnqn , const char
*subsysnqn , enum libnvmf_hmac_alg hmac , unsigned char *configured_key
, int key_len , long *key );
nine arguments. NINE. she's high-maintenance but she delivers β¨
π ARGUMENTS π
ctxβ thestruct libnvme_global_ctxobject. your whole context, your main character πkeyringβ the keyring to use. that's where the key's gonna live πkey_typeβ the type of the resulting key. yes it matters, no you can't skip ithostnqnβ Host NVMe Qualified Name π¦subsysnqnβ Subsystem NVMe Qualified Name π¦hmacβ the HMAC algorithm. it's anenum libnvmf_hmac_algbtwconfigured_keyβ the configured PSK you're deriving the retained PSK from. origin story energy πkey_lenβ length ofconfigured_key. obviously. she needs to know how big you arekeyβ key serial to return, like a little receipt π§Ύ
π₯ DESCRIPTION π₯
so here's the lore. this function derives a retained PSK from configured_key, and then from that it gets the TLS PSK and its identity β using identity version 0 β exactly as specified in the NVMe TCP Transport Specification 1.0, section 3.6.1.3. no cap, that's the spec reference, write it down π
then it stores the TLS PSK as type key_type under that identity, in the keyring you passed as keyring. iconic. she does the whole thing for you π
β οΈ but listen β the NVMe TCP Transport Specification 1.3 marks identity version 0 as obsolete. so likeβ¦ it's giving deprecated. if you actually want to pick your identity version, use libnvmf_insert_tls_key_versioned instead. she's the upgrade π
β RETURN β
0 on success, negative error code otherwise. that's it. zero is the slay, anything negative is the π
okay that's the whole page, bestie, you ate π
this little manual moment was brought to you by October 2026, the libnvme API manual, and libnvmf_insert_tls_key(9) β go forth and derive responsibly β¨π¦π
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms