libnvmf_gen...key_identity(9)
π libnvmf_gen...key_identity(9) π
okay so bestie, welcome to the libnvme API manual (section 9, we're fancy here) β this page is all about one little function that does a whole lot of key magic, and honestly? kinda iconic. π
β¨ NAME β¨
libnvmf_generate_tls_key_identity β the one that generates the TLS PSK identity π¦
πΈ SYNOPSIS πΈ
int libnvmf_generate_tls_key_identity (struct libnvme_global_ctx *ctx ,
const char *hostnqn , const char *subsysnqn , int version , enum
libnvmf_hmac_alg hmac , unsigned char *configured_key , int key_len ,
char **identity );
like, yes, that's a lot of arguments, but we're gonna go through every single one, no cap π
π«Ά ARGUMENTS π«Ά
ctxβ yourstruct libnvme_global_ctxobject, the main character of the whole libnvme situation β¨hostnqnβ the Host NVMe Qualified Name πsubsysnqnβ the Subsystem NVMe Qualified Name πversionβ which TLS PSK identity version you wanna use, your choice bestie βhmacβ the HMAC algorithm, a wholeenum libnvmf_hmac_algmomentconfigured_keyβ the Configured PSK that we derive the retained PSK from, lowkey the important one π₯key_lenβ the length ofconfigured_key, gotta know how big it is πidentityβ the TLS PSK identity we're handing back to you, the lil return gift π
π§ DESCRIPTION π§
so what does it actually do? it derives a retained PSK exactly as specified in the NVMe TCP Transport Specification 1.3, section 3.6.1.3 (yes, we cite our sources, we're not animals), and then it generates the corresponding TLS PSK identity. slay. π
β οΈ heads up bestie: it is the responsibility of the caller to free the returned string. literally don't forget, that's YOUR job, not the function's. memory leaks are not the vibe check you want to fail π
π RETURN π
0on success β we love a clean win β¨- negative error code otherwise β sad girl hours, check your error π
and that's the whole page, bestie! π this lil beauty lives in the libnvme API manual, section 9, sourced from libnvmf_generate_tls_key_id, dated October 2026 β go forth and generate those identities, iykyk π
π§π
π¦ 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