^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /* System hash blacklist.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Written by David Howells (dhowells@redhat.com)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #define pr_fmt(fmt) "blacklist: "fmt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/key.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/key-type.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/sched.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/ctype.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <linux/err.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <linux/seq_file.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <keys/system_keyring.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #include "blacklist.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include "common.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) static struct key *blacklist_keyring;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #ifdef CONFIG_SYSTEM_REVOCATION_LIST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) extern __initconst const u8 revocation_certificate_list[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) extern __initconst const unsigned long revocation_certificate_list_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) * The description must be a type prefix, a colon and then an even number of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) * hex digits. The hash is kept in the description.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) static int blacklist_vet_description(const char *desc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) int n = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) if (*desc == ':')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) for (; *desc; desc++)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) if (*desc == ':')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) goto found_colon;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) found_colon:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) desc++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) for (; *desc; desc++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) if (!isxdigit(*desc))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) n++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) if (n == 0 || n & 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) * The hash to be blacklisted is expected to be in the description. There will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) * be no payload.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) static int blacklist_preparse(struct key_preparsed_payload *prep)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) if (prep->datalen > 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) static void blacklist_free_preparse(struct key_preparsed_payload *prep)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) static void blacklist_describe(const struct key *key, struct seq_file *m)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) seq_puts(m, key->description);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) static struct key_type key_type_blacklist = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) .name = "blacklist",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) .vet_description = blacklist_vet_description,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) .preparse = blacklist_preparse,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) .free_preparse = blacklist_free_preparse,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) .instantiate = generic_key_instantiate,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) .describe = blacklist_describe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) * mark_hash_blacklisted - Add a hash to the system blacklist
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) * @hash - The hash as a hex string with a type prefix (eg. "tbs:23aa429783")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) int mark_hash_blacklisted(const char *hash)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) key_ref_t key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) key = key_create_or_update(make_key_ref(blacklist_keyring, true),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) "blacklist",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) hash,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) NULL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) ((KEY_POS_ALL & ~KEY_POS_SETATTR) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) KEY_USR_VIEW),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) KEY_ALLOC_NOT_IN_QUOTA |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) KEY_ALLOC_BUILT_IN);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) if (IS_ERR(key)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) pr_err("Problem blacklisting hash (%ld)\n", PTR_ERR(key));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) return PTR_ERR(key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) * is_hash_blacklisted - Determine if a hash is blacklisted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) * @hash: The hash to be checked as a binary blob
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) * @hash_len: The length of the binary hash
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) * @type: Type of hash
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) int is_hash_blacklisted(const u8 *hash, size_t hash_len, const char *type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) key_ref_t kref;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) size_t type_len = strlen(type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) char *buffer, *p;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) int ret = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) buffer = kmalloc(type_len + 1 + hash_len * 2 + 1, GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) if (!buffer)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) p = memcpy(buffer, type, type_len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) p += type_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) *p++ = ':';
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) bin2hex(p, hash, hash_len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) p += hash_len * 2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) *p = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) kref = keyring_search(make_key_ref(blacklist_keyring, true),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) &key_type_blacklist, buffer, false);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) if (!IS_ERR(kref)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) key_ref_put(kref);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) ret = -EKEYREJECTED;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) kfree(buffer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) EXPORT_SYMBOL_GPL(is_hash_blacklisted);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) int is_binary_blacklisted(const u8 *hash, size_t hash_len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) if (is_hash_blacklisted(hash, hash_len, "bin") == -EKEYREJECTED)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) return -EPERM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) EXPORT_SYMBOL_GPL(is_binary_blacklisted);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) #ifdef CONFIG_SYSTEM_REVOCATION_LIST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) * add_key_to_revocation_list - Add a revocation certificate to the blacklist
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) * @data: The data blob containing the certificate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) * @size: The size of data blob
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) int add_key_to_revocation_list(const char *data, size_t size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) key_ref_t key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) key = key_create_or_update(make_key_ref(blacklist_keyring, true),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) "asymmetric",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) NULL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) ((KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_VIEW),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) KEY_ALLOC_NOT_IN_QUOTA | KEY_ALLOC_BUILT_IN);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) if (IS_ERR(key)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) pr_err("Problem with revocation key (%ld)\n", PTR_ERR(key));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) return PTR_ERR(key);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) * is_key_on_revocation_list - Determine if the key for a PKCS#7 message is revoked
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) * @pkcs7: The PKCS#7 message to check
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) int is_key_on_revocation_list(struct pkcs7_message *pkcs7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) ret = pkcs7_validate_trust(pkcs7, blacklist_keyring);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) if (ret == 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) return -EKEYREJECTED;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) return -ENOKEY;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) * Initialise the blacklist
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) static int __init blacklist_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) const char *const *bl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) if (register_key_type(&key_type_blacklist) < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) panic("Can't allocate system blacklist key type\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) blacklist_keyring =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) keyring_alloc(".blacklist",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) KUIDT_INIT(0), KGIDT_INIT(0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) current_cred(),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) (KEY_POS_ALL & ~KEY_POS_SETATTR) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) KEY_USR_VIEW | KEY_USR_READ |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) KEY_USR_SEARCH,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) KEY_ALLOC_NOT_IN_QUOTA |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) KEY_ALLOC_SET_KEEP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) NULL, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) if (IS_ERR(blacklist_keyring))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) panic("Can't allocate system blacklist keyring\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) for (bl = blacklist_hashes; *bl; bl++)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) if (mark_hash_blacklisted(*bl) < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) pr_err("- blacklisting failed\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) * Must be initialised before we try and load the keys into the keyring.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) device_initcall(blacklist_init);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) #ifdef CONFIG_SYSTEM_REVOCATION_LIST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) * Load the compiled-in list of revocation X.509 certificates.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) static __init int load_revocation_certificate_list(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) if (revocation_certificate_list_size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) pr_notice("Loading compiled-in revocation X.509 certificates\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) return load_certificate_list(revocation_certificate_list, revocation_certificate_list_size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) blacklist_keyring);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) late_initcall(load_revocation_certificate_list);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) #endif