nvme_import_tls_key(2)
π nvme_import_tls_key β the libnvme API manual, bestie edition β¨
okay so hi bestie!! π«Ά welcome to nvme_import_tls_key(2) from the libnvme API manual. this is the one that takes your cute little encoded TLS key and turns it into the actual raw bytes your code can use. it's giving "glow up but for key material" π
πΈ NAME πΈ
nvme_import_tls_key β import a TLS key π
β¨ SYNOPSIS β¨
unsigned char * nvme_import_tls_key (const char *encoded_key , int
*key_len , unsigned int *hmac );
like yes, that's the whole signature, no cap. π
π ARGUMENTS π
encoded_keyβ the TLS key, but in PSK interchange format. that's the text-y version, not the raw bytes yet π¦key_lenβ this is where the length of the resulting key data goes. output girlie, she reports back πhmacβ the HMAC algorithm. which flavor of HMAC we're dealing with π
π§ DESCRIPTION π§
so basically this function imports key_data in the PSK Interchange format β and the lore for that format is defined in section 3.6.1.5 of the NVMe TCP Transport specification πβ¨. that spec is the source of truth, we do not freestyle it, periodt.
you hand it the interchange-format key, it hands you back the raw key data. the way that encoding works is literally spelled out in the spec so go read that section if you're curious, iykyk π
π RETURN π
it returns the raw data of the PSK π β or NULL with errno set if something went wrong π (yes, errno, the classic).
β οΈ heads up bestie: it is the responsibility of the caller to free the returned string. that memory is yours now. don't ghost it, free() it. fr fr.
π¦ SEE ALSO π¦
there's no SEE ALSO section in this one β it's a short queen, she said what she said π
<div>okay bye ily, this page was brought to you by libnvme and the fine folks who dated it July 2026 πΈβ¨ mwah, go free your strings ππ«Ά</div>
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· 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