summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2020-07-23 12:36:56 -0400
committerPeter Jones <pjones@redhat.com>2020-07-23 22:22:04 -0400
commitdd3a5d71252a1f94e37f1a4c8841d253630b305a (patch)
tree62599a58c09d806aae29b23e8ce17f3fec75f62a /include
parent7d542805ba5c48185128a2351bb315a5648fe3d7 (diff)
downloadefi-boot-shim-dd3a5d71252a1f94e37f1a4c8841d253630b305a.tar.gz
efi-boot-shim-dd3a5d71252a1f94e37f1a4c8841d253630b305a.zip
Add support for vendor_db built-in shim authorized list.
Potential new signing strategies ( for example signing grub, fwupdate and vmlinuz with separate certificates ) require shim to support a vendor provided bundle of trusted certificates and hashes, which allows shim to trust EFI binaries matching either certificate by signature or hash in the vendor_db. Functionality is similar to vendor_dbx. This also improves the mirroring quite a bit. Upstream: pr#206
Diffstat (limited to 'include')
-rw-r--r--include/console.h3
-rw-r--r--include/variables.h9
2 files changed, 9 insertions, 3 deletions
diff --git a/include/console.h b/include/console.h
index 9f259c71..810bf13a 100644
--- a/include/console.h
+++ b/include/console.h
@@ -78,12 +78,13 @@ struct _EFI_CONSOLE_CONTROL_PROTOCOL {
extern VOID console_fini(VOID);
extern VOID setup_verbosity(VOID);
extern UINT32 verbose;
-#define dprint(fmt, ...) ({ \
+#define dprint_(fmt, ...) ({ \
UINTN __dprint_ret = 0; \
if (verbose) \
__dprint_ret = console_print((fmt), ##__VA_ARGS__); \
__dprint_ret; \
})
+#define dprint(fmt, ...) dprint_(L"%a:%d:%a() " fmt, __FILE__, __LINE__, __func__, ##__VA_ARGS__)
extern EFI_STATUS print_crypto_errors(EFI_STATUS rc, char *file, const char *func, int line);
#define crypterr(rc) print_crypto_errors((rc), __FILE__, __func__, __LINE__)
diff --git a/include/variables.h b/include/variables.h
index 8566a1a4..436adb46 100644
--- a/include/variables.h
+++ b/include/variables.h
@@ -57,7 +57,12 @@ EFI_STATUS
variable_enroll_hash(CHAR16 *var, EFI_GUID owner,
UINT8 hash[SHA256_DIGEST_SIZE]);
EFI_STATUS
-variable_create_esl(void *cert, int cert_len, EFI_GUID *type, EFI_GUID *owner,
- void **out, int *outlen);
+variable_create_esl(const uint8_t *cert, const size_t cert_len,
+ const EFI_GUID *type, const EFI_GUID *owner,
+ uint8_t **out, size_t *outlen);
+EFI_STATUS
+fill_esl(const uint8_t *data, const size_t data_len,
+ const EFI_GUID *type, const EFI_GUID *owner,
+ uint8_t *out, size_t *outlen);
#endif /* SHIM_VARIABLES_H */