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 of configured_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