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 livekey_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 usehmacβ the HMAC algorithmconfigured_keyβ the configured key data you're deriving the key from πkey_lenβ length ofconfigured_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
- fedora 44: libnvme-doc 1.16.2-1.fc44 Β· 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