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 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,
		int hmac, bool generated)
{}

/*
 * NVMe PSK priority list
 *
 * 'Retained' PSKs (ie 'generated == false')
 * should be preferred to 'generated' PSKs,
 * 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);