libnvmf_insert_tls_key_versioned-libnvme32
Derive and insert a tls psk
Usage
int libnvmf_insert_tls_key_versioned (struct libnvme_global_ctx *ctx , const char *keyring , const char *key_type , const char *hostnqn , const char *subsysnqn , int version , enum libnvmf_hmac_alg hmac , unsigned char *configured_key , int key_len , long *key );
Arguments
ctx
|
struct libnvme_global_ctx object |
|---|---|
keyring
|
Keyring to use |
key_type
|
Type of the resulting key |
hostnqn
|
Host NVMe Qualified Name |
subsysnqn
|
Subsystem NVMe Qualified Name |
version
|
TLS PSK identity version to use |
hmac
|
HMAC algorithm |
configured_key
|
Configured PSK to derive the retained PSK from |
key_len
|
Length of configured_key |
key
|
Key serial to return |
Overview
Derives a retained PSK from configured_key and, from that, the TLS PSK and its identity as specified in the NVMe TCP Transport Specification 1.3, section 3.6.1.3. Stores the TLS PSK as type key_type under that identity in the keyring specified by keyring.
version selects the identity version: 0 is obsolete and defined in the NVMe TCP Transport Specification 1.0, 1 is TLS 1.3 with the PSK digest in the identity.
Return
0 on success, negative error code otherwise.