Skip to main content

nvme_insert_tls_key

Function nvme_insert_tls_key 

Source
pub unsafe extern "C" fn nvme_insert_tls_key(
    keyring: *const c_char,
    key_type: *const c_char,
    hostnqn: *const c_char,
    subsysnqn: *const c_char,
    hmac: c_int,
    configured_key: *mut c_uchar,
    key_len: c_int,
) -> c_long
Expand description

nvme_insert_tls_key() - Derive and insert TLS key @keyring: Keyring to use @key_type: Type of the resulting key @hostnqn: Host NVMe Qualified Name @subsysnqn: Subsystem NVMe Qualified Name @hmac: HMAC algorithm @configured_key: Configured key data to derive the key from @key_len: Length of @configured_key

Derives a ‘retained’ TLS key as specified in NVMe TCP 1.0a and stores it as type @key_type in the keyring specified by @keyring.

Return: The key serial number if the key could be inserted into the keyring or 0 with errno otherwise.