mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-03 11:56:51 -04:00
Register a '.nvme' keyring to hold keys for TLS and DH-HMAC-CHAP and add a new config option NVME_KEYRING. We need a separate keyring for NVMe as the configuration is done via individual commands (eg for configfs), and the usual per-session or per-process keyrings can't be used. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Keith Busch <kbusch@kernel.org>
29 lines
507 B
C
29 lines
507 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2023 Hannes Reinecke, SUSE Labs
|
|
*/
|
|
|
|
#ifndef _NVME_KEYRING_H
|
|
#define _NVME_KEYRING_H
|
|
|
|
#ifdef CONFIG_NVME_KEYRING
|
|
|
|
key_serial_t nvme_keyring_id(void);
|
|
int nvme_keyring_init(void);
|
|
void nvme_keyring_exit(void);
|
|
|
|
#else
|
|
|
|
static inline key_serial_t nvme_keyring_id(void)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline int nvme_keyring_init(void)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline void nvme_keyring_exit(void) {}
|
|
|
|
#endif /* !CONFIG_NVME_KEYRING */
|
|
#endif /* _NVME_KEYRING_H */
|