summaryrefslogtreecommitdiffstats
path: root/discover/boot.h
diff options
context:
space:
mode:
authortpearson@raptorengineering.com <tpearson@raptorengineering.com>2016-08-18 04:45:47 -0500
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-08-26 13:23:01 +1000
commit86c9d34380b0074dab1ba89a569a94280d6999c4 (patch)
tree22cf0cccbd4022d150e231adcb360b3bcf528cda /discover/boot.h
parent5496eee36f70631ae45403f90ed7b4dc143f27c0 (diff)
downloadtalos-petitboot-86c9d34380b0074dab1ba89a569a94280d6999c4.tar.gz
talos-petitboot-86c9d34380b0074dab1ba89a569a94280d6999c4.zip
Add support for GPG signature enforcement on booted
kernels and related blobs This can be used to implement a form of organization-controlled secure boot, whereby kernels may be loaded from a variety of sources but they will only boot if a valid signature file is found for each component, and only if the signature is listed in the /etc/pb-lockdown file. Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> (Minor build fixes and gpgme.m4, comment on secure boot in gpg.c)
Diffstat (limited to 'discover/boot.h')
-rw-r--r--discover/boot.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/discover/boot.h b/discover/boot.h
index ec61703..2190495 100644
--- a/discover/boot.h
+++ b/discover/boot.h
@@ -1,6 +1,9 @@
#ifndef _BOOT_H
#define _BOOT_H
+#include <types/types.h>
+#include "device-handler.h"
+
struct boot_option;
struct boot_command;
@@ -11,4 +14,37 @@ struct boot_task *boot(void *ctx, struct discover_boot_option *opt,
boot_status_fn status_fn, void *status_arg);
void boot_cancel(struct boot_task *task);
+
+struct boot_task {
+ struct load_url_result *image;
+ struct load_url_result *initrd;
+ struct load_url_result *dtb;
+ const char *local_image;
+ const char *local_initrd;
+ const char *local_dtb;
+ char *local_image_override;
+ char *local_initrd_override;
+ char *local_dtb_override;
+ const char *args;
+ const char *boot_tty;
+ boot_status_fn status_fn;
+ void *status_arg;
+ bool dry_run;
+ bool cancelled;
+ bool verify_signature;
+ struct load_url_result *image_signature;
+ struct load_url_result *initrd_signature;
+ struct load_url_result *dtb_signature;
+ struct load_url_result *cmdline_signature;
+ const char *local_image_signature;
+ const char *local_initrd_signature;
+ const char *local_dtb_signature;
+ const char *local_cmdline_signature;
+};
+
+enum {
+ KEXEC_LOAD_SIG_SETUP_INVALID = 253,
+ KEXEC_LOAD_SIGNATURE_FAILURE = 254,
+};
+
#endif /* _BOOT_H */
OpenPOWER on IntegriCloud