File Index
Files and directories
Sign in
FILE

nvme-keyring.h

File preview with syntax highlighting.

linux-6.19.14/include/linux/nvme-keyring.h C
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Copyright (c) 2023 Hannes Reinecke, SUSE Labs
 4 */
 5
 6#ifndef _NVME_KEYRING_H
 7#define _NVME_KEYRING_H
 8
 9#include <linux/key.h>
10
11#if IS_ENABLED(CONFIG_NVME_KEYRING)
12
13struct key *nvme_tls_psk_refresh(struct key *keyring,
14		const char *hostnqn, const char *subnqn, u8 hmac_id,
15		u8 *data, size_t data_len, const char *digest);
16key_serial_t nvme_tls_psk_default(struct key *keyring,
17		const char *hostnqn, const char *subnqn);
18
19key_serial_t nvme_keyring_id(void);
20struct key *nvme_tls_key_lookup(key_serial_t key_id);
21#else
22static inline struct key *nvme_tls_psk_refresh(struct key *keyring,
23		const char *hostnqn, char *subnqn, u8 hmac_id,
24		u8 *data, size_t data_len, const char *digest)
25{
26	return ERR_PTR(-ENOTSUPP);
27}
28static inline key_serial_t nvme_tls_psk_default(struct key *keyring,
29		const char *hostnqn, const char *subnqn)
30{
31	return 0;
32}
33static inline key_serial_t nvme_keyring_id(void)
34{
35	return 0;
36}
37static inline struct key *nvme_tls_key_lookup(key_serial_t key_id)
38{
39	return ERR_PTR(-ENOTSUPP);
40}
41#endif /* !CONFIG_NVME_KEYRING */
42#endif /* _NVME_KEYRING_H */
~/ Read-only file preview.