nvme_export...ey_versioned(2)

πŸ’– nvme_export_tls_key_versioned β€” NAME πŸ’–

okay so bestie, welcome to the libnvme API manual (section 2, we're fancy here πŸŽ€). this page is all about nvme_export_tls_key_versioned, and what it does is Export a TLS pre-shared key. that's it. that's the whole job. she exports. πŸ’…


✨ SYNOPSIS ✨

char * nvme_export_tls_key_versioned (unsigned char version , unsigned char hmac , const unsigned char *key_data , size_t key_len );

four args, one return, no cap. let's get into it πŸ¦‹


🫢 ARGUMENTS 🫢

  • version β€” tells you the representation of the TLS PSK. like, which flavor of PSK we're talking about here. it's giving "context, bestie" ✨
  • hmac β€” the HMAC algorithm used to transfor the configured PSK into a retained PSK. so it's the glow-up algorithm, turning your configured PSK into the retained one πŸ”₯
  • key_data β€” the raw data of the key. straight up, no filter, raw πŸ’€
  • key_len β€” the length of key_data. she's the measuring tape, keepin' things honest πŸ“

🌸 DESCRIPTION 🌸

so here's the tea: this function returns key_data in the PSK Interchange format, as defined in section 3.6.1.5 of the NVMe TCP Transport specification. that's the exact spec section, don't @ me, go read it, iykyk πŸ“–βœ¨


πŸ‘‘ RETURN πŸ‘‘

she hands you back the string containing the TLS identity πŸŽ€ …or NULL with errno set on error 😭 (yes, errno, the classic).

⚠️ bestie listen: it is the responsibility of the caller to free the returned string. she's not cleaning up after herself β€” that's on you. free it. fr fr. don't leak, we don't do that here πŸ’€

πŸ’œ a lil sign-off πŸ’œ

this lil page came from the libnvme API manual, dated July 2026. that's the whole vibe. now go free your strings and slay πŸ’…πŸŒˆβ­

periodt. 🧚

πŸ“¦ where this page comes from