libnvmf_export_tls_key(9)
π libnvmf_export_tls_key(9) β the libnvme API manual, bestie edition π
okay so picture this: you're deep in the libnvme API manual (yes that's the whole vibe of this page, we're in the libnvme API manual β¨) and you need to get a raw PSK out into the world looking all fancy. That's literally this function. Let's go π«Ά
β¨ NAME β¨
libnvmf_export_tls_key β encode a PSK in the PSK interchange format π
πΈ SYNOPSIS πΈ
int libnvmf_export_tls_key (struct libnvme_global_ctx *ctx , const
unsigned char *key_data , int key_len , char **encoded_keyp );
like, that's the whole signature, copied exactly, no notes π
π¦ ARGUMENTS π¦
ctxβ yourstruct libnvme_global_ctxobject, the context baddie that holds it all together πkey_dataβ the raw PSK data, straight up, no filter π₯key_lenβ the length ofkey_data, obviously, gotta know how much of the good stuff there is βencoded_keypβ the encoded PSK to return, i.e. where the glow-up lands π
π§ DESCRIPTION π§
so this one returns key_data in the PSK Interchange format as defined in section 3.6.1.5 of the NVMe TCP Transport Specification 1.3. That's the spec, that's the section, that's the version β no cap, no guessing π
β¨
β οΈ heads up bestie: it is the responsibility of the caller to free the returned string. That's you. Not the function. You. Free it. Don't leave it hanging or it's giving memory leak π
π RETURN π
0on success π- a negative error code otherwise π
that's it, that's the page π go forth and encode your PSKs, icon behavior only ππ
signed off by the libnvme API manual, version libnvmf_export_tls_key, dated October 2026 β mwah, ily, bye π«Άππ¦
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms