summaryrefslogtreecommitdiffstats
path: root/security/integrity/platform_certs/keyring_handler.h
blob: 212d894a8c0c0f238cc927a51d24ae87649a5483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* SPDX-License-Identifier: GPL-2.0 */

#ifndef PLATFORM_CERTS_INTERNAL_H
#define PLATFORM_CERTS_INTERNAL_H

#include <linux/efi.h>

void blacklist_hash(const char *source, const void *data,
		    size_t len, const char *type,
		    size_t type_len);

/*
 * Blacklist an X509 TBS hash.
 */
void blacklist_x509_tbs(const char *source, const void *data, size_t len);

/*
 * Blacklist the hash of an executable.
 */
void blacklist_binary(const char *source, const void *data, size_t len);

/*
 * Return the handler for particular signature list types found in the db.
 */
efi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type);

/*
 * Return the handler for particular signature list types found in the mok.
 */
efi_element_handler_t get_handler_for_mok(const efi_guid_t *sig_type);

/*
 * Return the handler for particular signature list types found in the dbx.
 */
efi_element_handler_t get_handler_for_dbx(const efi_guid_t *sig_type);

#endif

#ifndef UEFI_QUIRK_SKIP_CERT
#define UEFI_QUIRK_SKIP_CERT(vendor, product) \
		 .matches = { \
			DMI_MATCH(DMI_BOARD_VENDOR, vendor), \
			DMI_MATCH(DMI_PRODUCT_NAME, product), \
		},
#endif