* Update key tools VS project to 2022.
* Fix a few warnings in sign.c
* Fix issues with windows already having min/max.
* Fix (workaround) issue with key tools needing WOLFBOOT_SECTOR_SIZE.
Only allow delta update if the sha digest of the base image matches the
expected value. This is to prevent the delta update from being applied
to an image that is not the expected base image, even if the version
matches.
The mismatch should never happen in real-life scenarios, but it is to check
for false positives during integration, testing and development.
* Added new `WOLFBOOT_TPM_SEAL` and `WOLFBOOT_TPM_SEAL_NV_BASE` config options.
* Added new `tools/tpm/policy_create` tool for assisting with creation of a policy digest. The sign keytool `--policy=file` signs the policy.
* Added new `WOLFBOOT_TPM_VERIFY` option to enable offloading of the asymmetric verification to the TPM. By default wolfCrypt will be used.
* Added example seal/unseal to update_flash for ARCH_SIM.
* Renamed `WOLFBOOT_TPM_KEYSTORE_NV_INDEX` to `WOLFBOOT_TPM_KEYSTORE_NV_BASE` to support multiple public keys.
* Refactored most TPM code into tpm.c.
* Refactored the keystore ROT to use new `wolfBoot_check_rot` API.
* Refactored the sign keytool to have a sign_digest function to allow signing firmware and policy for sealing/unsealing.
* Fix for make distclean && make using the wrong key tools.
If the calculated header_sz is smaller than the value requested via
.config (or via IMAGE_HEADER_SIZE=x when compiling keytools), override
the value calculated with the preset.
Use generic buffer API to ensure that the files are open with the right
flags.
Non-POSIX systems would require `open()` to use an extra O_BINARY flag
to ensure the file is properly processed and sizes calculated
accordingly. As file descriptors are only needed in mmap() mode, the
win32 interface is reworked to use `fopen()` instead.
Thanks to Erik Chang for reporting this issue.
* Expanded the NXP QorIQ T2080 documentation in `docs/Targets.md`.
* T2080 fixes for boot code placement and generation of .bin.
* T2080 UART driver cleanup.
* Improve bin-assemble fill speed and report items added.
* Make portability fixes to enable building in `mingw32-make`.
* Cleanup the `docs/Targets.md` sections and links.
* Cleanup execute bits on code files.