linux/drivers/nvme/common/keyring.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2023 Hannes Reinecke, SUSE Labs
 */

#include <linux/module.h>
#include <linux/seq_file.h>
#include <linux/key.h>
#include <linux/key-type.h>
#include <keys/user-type.h>
#include <linux/nvme.h>
#include <linux/nvme-tcp.h>
#include <linux/nvme-keyring.h>

static struct key *nvme_keyring;

key_serial_t nvme_keyring_id(void)
{}
EXPORT_SYMBOL_GPL();

static bool nvme_tls_psk_revoked(struct key *psk)
{}

struct key *nvme_tls_key_lookup(key_serial_t key_id)
{}
EXPORT_SYMBOL_GPL();

static void nvme_tls_psk_describe(const struct key *key, struct seq_file *m)
{}

static bool nvme_tls_psk_match(const struct key *key,
			       const struct key_match_data *match_data)
{}

static int nvme_tls_psk_match_preparse(struct key_match_data *match_data)
{}

static struct key_type nvme_tls_psk_key_type =;

static struct key *nvme_tls_psk_lookup(struct key *keyring,
		const char *hostnqn, const char *subnqn,
		u8 hmac, u8 psk_ver, bool generated)
{}

/*
 * NVMe PSK priority list
 *
 * 'Retained' PSKs (ie 'generated == false') should be preferred to 'generated'
 * PSKs, PSKs with hash (psk_ver 1) should be preferred to PSKs without hash
 * (psk_ver 0), and SHA-384 should be preferred to SHA-256.
 */
static struct nvme_tls_psk_priority_list {} nvme_tls_psk_prio[] =;

/*
 * nvme_tls_psk_default - Return the preferred PSK to use for TLS ClientHello
 */
key_serial_t nvme_tls_psk_default(struct key *keyring,
		      const char *hostnqn, const char *subnqn)
{}
EXPORT_SYMBOL_GPL();

static int __init nvme_keyring_init(void)
{}

static void __exit nvme_keyring_exit(void)
{}

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
module_init();
module_exit(nvme_keyring_exit);