NAME
libnvmf_generate_tls_key_identity - Generate the TLS PSK identity
SYNOPSIS
int libnvmf_generate_tls_key_identity (struct libnvme_global_ctx *ctx , const char *hostnqn , const char *subsysnqn , int version , enum libnvmf_hmac_alg hmac , unsigned char *configured_key , int key_len , char **identity );
ARGUMENTS
- ctx
-
struct libnvme_global_ctx object
- 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
- identity
-
TLS PSK identity to return
DESCRIPTION
Derives a retained PSK as specified in the NVMe TCP Transport Specification 1.3, section 3.6.1.3, and generates the corresponding TLS PSK identity.
It is the responsibility of the caller to free the returned string.
RETURN
0 on success, negative error code otherwise.