LIBNVMF_IMPORT_TLS_KEY_VERSIONED-LIBNVME3(2)

πŸ“¦ version 3.2, in arch rolling

πŸ’– libnvmf_import_tls_key_versioned(2) πŸ’–

okay so this is from the libnvme API manual, and bestie, it's literally just one function that turns a fancy encoded PSK string back into the actual raw key. no cap, that's the whole vibe.


🌸 NAME 🌸

libnvmf_import_tls_key_versioned β€” decodes a PSK from the PSK interchange format ✨


πŸŽ€ SYNOPSIS πŸŽ€

int libnvmf_import_tls_key_versioned (struct libnvme_global_ctx *ctx ,
const char *encoded_key , unsigned char *version , enum libnvmf_hmac_alg
*hmac , size_t *key_len , unsigned char **key );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • ctx β€” the struct libnvme_global_ctx object, your main character context, iykyk 🫢
  • encoded_key β€” the PSK in PSK interchange format, aka the glow-up version of the key
  • version β€” the version of the PSK interchange format read from encoded_key, handed back to you. it's always 1; literally any other value gets rejected with -EINVAL πŸ’€
  • hmac β€” the hash function recorded in encoded_key, returned to you; it derives a retained PSK from a configured PSK 🧚
  • key_len β€” the length of the decoded PSK, returned
  • key β€” the decoded PSK itself, returned πŸ‘‘

✨ DESCRIPTION ✨

So it decodes encoded_key from the PSK Interchange format, as defined in section 3.6.1.5 of the NVMe TCP Transport Specification 1.3. iconic spec reference, we love a citation πŸ“š

🚨 important bestie: it is the responsibility of the caller to free the returned buffer. that memory is yours now, don't just abandon it 😭

🌈 RETURN 🌈

0 on success, negative error code otherwise. slay πŸ’…


k bye, this page was brought to you by the libnvme source, dated October 2026 β€” go decode some keys, mwah πŸ“πŸ’œ

πŸ“¦ where this page comes from