Skip to content

Instantly share code, notes, and snippets.

@ilebedev
Last active September 16, 2018 02:30
Show Gist options
  • Save ilebedev/68f5e886c77156b10de5ec6579982200 to your computer and use it in GitHub Desktop.
Save ilebedev/68f5e886c77156b10de5ec6579982200 to your computer and use it in GitHub Desktop.
// Add at line XXX:XXX
/* TODO: replace this with a constant encoding
the manufacturer's public key: */
uint_t pk_m[32] = {\xDE, \xAD, \xBE, \xEF, ...};
extern uint8_t boot_image_certificate[64];
// Add at line XXX:XXX
if (!verify signature of hash with pk_m) {
// PANIC
// TODO: print an error here
panic:
goto panic;
__builtin_unreachable();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment