nvme_insert_tls_key_compat(9)

✨ nvme_insert_tls_key_compat(9) ✨

okay bestie, sit down, hydrate, because we're doing libnvme API manual energy today and this one is genuinely a little ✨special✨ β€” it's the compat girlie, the one that does things the old way. iykyk πŸ’…


🌸 NAME 🌸

nvme_insert_tls_key_compat β€” derive and insert TLS key πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

long nvme_insert_tls_key_compat (const char *keyring , const char
*key_type , const char *hostnqn , const char *subsysnqn , int version ,
int hmac , unsigned char *configured_key , int key_len );

no cap, that's the whole signature. every pointer, every int, all of it, untouched πŸ’–


πŸ’œ ARGUMENTS πŸ’œ

  • keyring β€” the keyring to use πŸ—οΈ like, where the key is gonna live
  • key_type β€” the type of the resulting key (yes, the resulting one, not the input, pay attention bestie)
  • hostnqn β€” Host NVMe Qualified Name 🏠
  • subsysnqn β€” Subsystem NVMe Qualified Name 🧩
  • version β€” which key version to use
  • hmac β€” the HMAC algorithm
  • configured_key β€” the configured key data you're deriving the key from πŸ”‘
  • key_len β€” length of configured_key πŸ“

🌈 DESCRIPTION 🌈

so here's the tea β˜• β€” this function derives a 'retained' TLS key exactly as specified in NVMe TCP 1.0a (that's when version is set to 0) or in NVMe TP8028 (that's when version is set to 1), and then stores it as type key_type in the keyring specified by keyring. periodt. πŸ’…

and this version β€” the _compat one, the main character of this page β€” differs from nvme_insert_tls_key_versioned in one specific way: it uses the original implementation for HKDF Expand-Label, which does not prefix the 'info' and 'label' strings with the length. 🫢

not me being the legacy-behaviour one... but fr fr, if you need the no-length-prefix behaviour, this is your girl. don't come for the new one and expect the old strings, iykyk πŸ’€

⭐ RETURN ⭐

the key serial number if the key could be inserted into the keyring… or 0 with errno otherwise. πŸ™ˆ

like, 0 = it did not slay. check errno, bestie, she'll tell you what happened. πŸ”₯


and that's the whole page, no notes, we ate πŸ“βœ¨ β€” this was the libnvme API manual, dated August 2026, and yes it's still calling itself nvme_insert_tls_key_compat(9) in the footer because it knows exactly who it is. mwah. πŸ’–πŸ§šβ€β™€οΈπŸ‘‘

πŸ“¦ where this page comes from