#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/key.h>
#include <linux/key-type.h>
#include <linux/sched.h>
#include <linux/ctype.h>
#include <linux/err.h>
#include <linux/seq_file.h>
#include <linux/uidgid.h>
#include <keys/asymmetric-type.h>
#include <keys/system_keyring.h>
#include "blacklist.h"
#define MAX_HASH_LEN …
#define BLACKLIST_KEY_PERM …
static const char tbs_prefix[] = …;
static const char bin_prefix[] = …;
static struct key *blacklist_keyring;
#ifdef CONFIG_SYSTEM_REVOCATION_LIST
extern __initconst const u8 revocation_certificate_list[];
extern __initconst const unsigned long revocation_certificate_list_size;
#endif
static int blacklist_vet_description(const char *desc)
{ … }
static int blacklist_key_instantiate(struct key *key,
struct key_preparsed_payload *prep)
{ … }
static int blacklist_key_update(struct key *key,
struct key_preparsed_payload *prep)
{ … }
static void blacklist_describe(const struct key *key, struct seq_file *m)
{ … }
static struct key_type key_type_blacklist = …;
static char *get_raw_hash(const u8 *hash, size_t hash_len,
enum blacklist_hash_type hash_type)
{ … }
static int mark_raw_hash_blacklisted(const char *hash)
{ … }
int mark_hash_blacklisted(const u8 *hash, size_t hash_len,
enum blacklist_hash_type hash_type)
{ … }
int is_hash_blacklisted(const u8 *hash, size_t hash_len,
enum blacklist_hash_type hash_type)
{ … }
EXPORT_SYMBOL_GPL(…);
int is_binary_blacklisted(const u8 *hash, size_t hash_len)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_SYSTEM_REVOCATION_LIST
int add_key_to_revocation_list(const char *data, size_t size)
{ … }
int is_key_on_revocation_list(struct pkcs7_message *pkcs7)
{ … }
#endif
static int restrict_link_for_blacklist(struct key *dest_keyring,
const struct key_type *type, const union key_payload *payload,
struct key *restrict_key)
{ … }
static int __init blacklist_init(void)
{ … }
device_initcall(blacklist_init);
#ifdef CONFIG_SYSTEM_REVOCATION_LIST
static __init int load_revocation_certificate_list(void)
{ … }
late_initcall(load_revocation_certificate_list);
#endif