18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci#ifndef PLATFORM_CERTS_INTERNAL_H 48c2ecf20Sopenharmony_ci#define PLATFORM_CERTS_INTERNAL_H 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#include <linux/efi.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_civoid blacklist_hash(const char *source, const void *data, 98c2ecf20Sopenharmony_ci size_t len, const char *type, 108c2ecf20Sopenharmony_ci size_t type_len); 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci/* 138c2ecf20Sopenharmony_ci * Blacklist an X509 TBS hash. 148c2ecf20Sopenharmony_ci */ 158c2ecf20Sopenharmony_civoid blacklist_x509_tbs(const char *source, const void *data, size_t len); 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/* 188c2ecf20Sopenharmony_ci * Blacklist the hash of an executable. 198c2ecf20Sopenharmony_ci */ 208c2ecf20Sopenharmony_civoid blacklist_binary(const char *source, const void *data, size_t len); 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci/* 238c2ecf20Sopenharmony_ci * Return the handler for particular signature list types found in the db. 248c2ecf20Sopenharmony_ci */ 258c2ecf20Sopenharmony_ciefi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type); 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci/* 288c2ecf20Sopenharmony_ci * Return the handler for particular signature list types found in the dbx. 298c2ecf20Sopenharmony_ci */ 308c2ecf20Sopenharmony_ciefi_element_handler_t get_handler_for_dbx(const efi_guid_t *sig_type); 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#endif 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#ifndef UEFI_QUIRK_SKIP_CERT 358c2ecf20Sopenharmony_ci#define UEFI_QUIRK_SKIP_CERT(vendor, product) \ 368c2ecf20Sopenharmony_ci .matches = { \ 378c2ecf20Sopenharmony_ci DMI_MATCH(DMI_BOARD_VENDOR, vendor), \ 388c2ecf20Sopenharmony_ci DMI_MATCH(DMI_PRODUCT_NAME, product), \ 398c2ecf20Sopenharmony_ci }, 408c2ecf20Sopenharmony_ci#endif 41