keyring_handler.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef PLATFORM_CERTS_INTERNAL_H
  3. #define PLATFORM_CERTS_INTERNAL_H
  4. #include <linux/efi.h>
  5. void blacklist_hash(const char *source, const void *data,
  6. size_t len, const char *type,
  7. size_t type_len);
  8. /*
  9. * Blacklist an X509 TBS hash.
  10. */
  11. void blacklist_x509_tbs(const char *source, const void *data, size_t len);
  12. /*
  13. * Blacklist the hash of an executable.
  14. */
  15. void blacklist_binary(const char *source, const void *data, size_t len);
  16. /*
  17. * Return the handler for particular signature list types found in the db.
  18. */
  19. efi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type);
  20. /*
  21. * Return the handler for particular signature list types found in the mok.
  22. */
  23. efi_element_handler_t get_handler_for_mok(const efi_guid_t *sig_type);
  24. /*
  25. * Return the handler for particular signature list types for CA keys.
  26. */
  27. efi_element_handler_t get_handler_for_ca_keys(const efi_guid_t *sig_type);
  28. /*
  29. * Return the handler for particular signature list types for code signing keys.
  30. */
  31. efi_element_handler_t get_handler_for_code_signing_keys(const efi_guid_t *sig_type);
  32. /*
  33. * Return the handler for particular signature list types found in the dbx.
  34. */
  35. efi_element_handler_t get_handler_for_dbx(const efi_guid_t *sig_type);
  36. #endif
  37. #ifndef UEFI_QUIRK_SKIP_CERT
  38. #define UEFI_QUIRK_SKIP_CERT(vendor, product) \
  39. .matches = { \
  40. DMI_MATCH(DMI_BOARD_VENDOR, vendor), \
  41. DMI_MATCH(DMI_PRODUCT_NAME, product), \
  42. },
  43. #endif