Skip to content

Updater: enable final checks from outside #2785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Updater: enable final checks from outside #2785

wants to merge 1 commit into from

Conversation

silbe
Copy link

@silbe silbe commented Dec 21, 2016

As mentioned in #2499, I'm using a custom OTA implementation that fetches only a cryptographically secure checksum via HTTPS and performs the actual update over HTTP (to avoid around running out of memory during the update). To perform the checksum verification, it needs to know where in flash the update has been downloaded to (i.e. _startAddress). To prevent the update from getting applied if the checksum doesn't match but still allow future update attempts, it needs a way to abort an update operation.

These changes are useful not just for performing verification of non-MD5 checksum, but for any kind of post-download verification (e.g. embedded signatures, rollback protection).

Enable Updater users to perform final checks after the image has been
downloaded and flashed, but the boot loader not been updated yet:

1. Provide access to the start address of the update area in flash so
   the update image can be verified.

2. Provide a way to abort the update.
@earlephilhower
Copy link
Collaborator

I think Updater.cpp has been refactored a lot since this PR came in. Right now the PR adds an abort() function and a simple member accessor, which is reasonable, but there is no way to stop the actual updater from applying the update if you don't use it.

Since we've redone the Updater, and added automatic crypto-signed verification, and it can't actually affect things with current code, I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants