Skip to content
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

Update lib - User can choose if calc MD5 from encrypted or decrypted file #10510

Merged
merged 10 commits into from
Oct 24, 2024

Conversation

zinkett
Copy link
Contributor

@zinkett zinkett commented Oct 23, 2024

Description of Change

I'm using OTA with pre-encrypted bin file.
So it's easy to calculate the MD5 of the encrypted file before send it to device.
Update function at the moment is calculating the MD5 of the decrypted file.
With this commit with
Update.setMD5(md5, false);
the check of MD5 will be done of encrypted file. Otherwise it will be calculate of the decrypted file.

Tests scenarios

I have tested my Pull Request on Arduino-esp32 core v3.0.6 with ESP32

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
At the present moment, if user want use OTA, the function calculate MD5 of the decrypted file, but if file is encrypted from source, could be more useful to know the MD5 of the encrypted file.
md5

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@CLAassistant
Copy link

CLAassistant commented Oct 23, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

github-actions bot commented Oct 23, 2024

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Update Updater.cpp":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update libraries/Update/src/Update.h":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update libraries/Update/src/Update.h":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update libraries/Update/src/Updater.cpp":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update libraries/Update/src/Updater.cpp":
    • summary looks empty
    • type/action looks empty
  • the commit message "User can choose if calc MD5 from decrypted file":
    • body's lines must not be longer than 100 characters
    • summary looks empty
    • type/action looks empty
  • the commit message "md5":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 20 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

⚠️ Please consider squashing your 10 commits (simplifying branch history).

👋 Hello zinkett, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 120edca

@zinkett zinkett changed the title User can choose if calc MD5 from decrypted file Update lib - User can choose if calc MD5 from decrypted file Oct 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@SuGlider
Copy link
Collaborator

SuGlider commented Oct 23, 2024

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@zinkett - Please electronically sign the CLA using your Github username, if you agree to it.

@zinkett zinkett changed the title Update lib - User can choose if calc MD5 from decrypted file Update lib - User can choose if calc MD5 from encrypted or decrypted file Oct 23, 2024
Copy link
Contributor

github-actions bot commented Oct 23, 2024

Test Results

 56 files   56 suites   4m 8s ⏱️
 21 tests  21 ✅ 0 💤 0 ❌
134 runs  134 ✅ 0 💤 0 ❌

Results for commit 120edca.

♻️ This comment has been updated with latest results.

@SuGlider
Copy link
Collaborator

@zinkett - There are some compilation error within this PR (pointed by CI). Please check it at https://github.com/espressif/arduino-esp32/actions/runs/11479892688/job/31957134561?pr=10510

libraries/Update/src/Update.h Outdated Show resolved Hide resolved
libraries/Update/src/Update.h Outdated Show resolved Hide resolved
libraries/Update/src/Updater.cpp Outdated Show resolved Hide resolved
libraries/Update/src/Updater.cpp Outdated Show resolved Hide resolved
@lucasssvaz lucasssvaz added Area: Libraries Issue is related to Library support. Status: Pending CLA ⚠️ Contributor is required to sign the CLA labels Oct 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Contributor Author

@zinkett zinkett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @lucasssvaz

zinkett and others added 4 commits October 24, 2024 08:55

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
@SuGlider SuGlider removed the Status: Pending CLA ⚠️ Contributor is required to sign the CLA label Oct 24, 2024
Copy link
Contributor

github-actions bot commented Oct 24, 2024

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32S30⚠️ +200.000.00000.000.00
ESP32S2💚 -12⚠️ +160.000.00000.000.00
ESP32C30⚠️ +320.00⚠️ +0.010⚠️ +160.00⚠️ +0.04
ESP32C60⚠️ +320.00⚠️ +0.010⚠️ +160.00⚠️ +0.04
ESP32H20⚠️ +320.00⚠️ +0.01000.000.00
ESP32💚 -4⚠️ +40.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
Update/examples/AWS_S3_OTA_Update⚠️ +160⚠️ +120⚠️ +320⚠️ +320--⚠️ +40
Update/examples/HTTPS_OTA_Update⚠️ +40💚 -120⚠️ +4⚠️ +16⚠️ +4⚠️ +16--00
Update/examples/HTTP_Client_AES_OTA_Update⚠️ +120⚠️ +120⚠️ +320⚠️ +320--⚠️ +40
Update/examples/HTTP_Server_AES_OTA_Update⚠️ +200⚠️ +160⚠️ +320⚠️ +320--⚠️ +40
Update/examples/OTAWebUpdater⚠️ +120⚠️ +120⚠️ +320⚠️ +320--💚 -40
Update/examples/SD_Update⚠️ +120⚠️ +120⚠️ +320⚠️ +320⚠️ +320⚠️ +40

Copy link
Collaborator

@lucasssvaz lucasssvaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@me-no-dev me-no-dev added the Status: Pending Merge Pull Request is ready to be merged label Oct 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@me-no-dev me-no-dev merged commit 330beb4 into espressif:master Oct 24, 2024
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Libraries Issue is related to Library support. Status: Pending Merge Pull Request is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants