libnvmf_export_tls_key-libnvme32
Encode a psk in the psk interchange format
Usage
int libnvmf_export_tls_key
(struct
libnvme_global_ctx
*ctx
,
const
unsigned
char
*key_data
,
int
key_len
,
char
**encoded_keyp
);
Arguments
- ctx
-
struct libnvme_global_ctx object
- key_data
-
Raw PSK data
- key_len
-
Length of key_data
- encoded_keyp
-
Encoded PSK to return
Overview
Returns key_data in the PSK Interchange format as defined in section 3.6.1.5 of the NVMe TCP Transport Specification 1.3.
It is the responsibility of the caller to free the returned string.
Return
0 on success, negative error code otherwise.