nvme_genera...ntity_compat(9)
β¨ NAME β¨
nvme_generate_tls_key_identity_compat β bestie, it generates the TLS key identity π
This one lives in the libnvme API manual, section 9, and yeah the title up top is a whole mouthful so we're just gonna vibe with it here instead π«Ά
πΈ SYNOPSIS πΈ
char * nvme_generate_tls_key_identity_compat (const char *hostnqn ,
const char *subsysnqn , int version , int hmac , unsigned char
*configured_key , int key_len );
okay so she takes six args and hands you back a char *. that's the whole vibe check π
π ARGUMENTS π
hostnqnβ the Host NVMe Qualified Name. like, who's asking πsubsysnqnβ the Subsystem NVMe Qualified Name. who they're asking about β¨versionβ which Key version to use. pick one, no take-backs πhmacβ the HMAC algorithm. the secret sauce selection πΈconfigured_keyβ the Configured key data to derive the key from. this is the raw material, the starter dough πkey_lenβ Length ofconfigured_key. gotta know how big the dough is before you bake π
π¦ DESCRIPTION π¦
So what's actually happening here: this derives a 'retained' TLS key exactly as specified in NVMe TCP, and then generates the corresponding TLS identity from it. slay π₯
Now here's the tea, and it's the whole reason this function exists as a separate lil guy β β this version differs from nvme_generate_tls_key_identity in one very specific way: it uses the original implementation for HKDF-Expand-Label, and that original implementation does not prefix the 'info' and 'label' string with the length.
That's it. that's the difference. it's giving "same function, different era" π if you need the length-prefixed behaviour you're in the wrong function bestie, go see the other one (iykyk).
β RETURN β
It returns the string containing the TLS identity β¨
β οΈ okay this part matters: it is the responsibility of the caller to free the returned string. not the function's problem, not libnvme's problem β yours. free it or leak it, and leaking is not the aesthetic π
π SEE ALSO π
nothing else linked here, so go forth and derive responsibly π§
and that's the page, bestie β from the libnvme API manual, dated August 2026. mwah, go free your strings πβ¨π
π¦ where this page comes from
- fedora 44: libnvme-doc 1.16.2-1.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms