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

subsys: fota_download: correcting URI check #11904

Conversation

VTPeltoketo
Copy link
Contributor

  • HASH checksums are used to validate changed URI

@VTPeltoketo VTPeltoketo requested a review from rlubos as a code owner July 28, 2023 10:34
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jul 28, 2023
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jul 28, 2023

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-ci-nrfconnect-boot-fw-update X
test-fw-nrfconnect-nrf-iot_mosh X
test-fw-nrfconnect-nrf-iot_serial_lte_modem X
test-fw-nrfconnect-nrf-iot_zephyr_lwm2m X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

@VTPeltoketo VTPeltoketo force-pushed the NCSDK-22850-fota_download-corrected-URI-check branch from 5639852 to 124cbc5 Compare July 28, 2023 10:41
@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

Copy link
Contributor

@SeppoTakalo SeppoTakalo left a comment

Choose a reason for hiding this comment

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

Looks functionally correct.

Please remove the extra Kconfig dependency and rename the variables to *_hash instead of *_sha256

subsys/net/lib/fota_download/Kconfig Outdated Show resolved Hide resolved
subsys/net/lib/fota_download/src/fota_download.c Outdated Show resolved Hide resolved
@VTPeltoketo VTPeltoketo force-pushed the NCSDK-22850-fota_download-corrected-URI-check branch from 13f795f to 8559759 Compare July 31, 2023 11:23
@VTPeltoketo VTPeltoketo removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Aug 3, 2023
@VTPeltoketo VTPeltoketo force-pushed the NCSDK-22850-fota_download-corrected-URI-check branch from 8559759 to 6d179cd Compare August 3, 2023 07:55
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Aug 3, 2023
@VTPeltoketo VTPeltoketo force-pushed the NCSDK-22850-fota_download-corrected-URI-check branch from 7e01b69 to e8442c4 Compare August 3, 2023 10:29
Copy link
Contributor

@SeppoTakalo SeppoTakalo left a comment

Choose a reason for hiding this comment

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

Squash both of these commits together. It is basically just one change.

@VTPeltoketo VTPeltoketo force-pushed the NCSDK-22850-fota_download-corrected-URI-check branch from 7d5a0d0 to 013aeae Compare August 3, 2023 11:47
Copy link
Contributor

@sigvartmh sigvartmh left a comment

Choose a reason for hiding this comment

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

I assume this is either to speed up the check or to remove strcmp right? Anyways so far changes looks good to me.

@VTPeltoketo
Copy link
Contributor Author

@sigvartmh There were two reasons: 1) There was a bug in the original code, the pointers of strcmp pointed to the same address. 2) strcmp requires a second buffer of URI and the buffer is quite big. We are running out of RAM and second buffer is not a viable solution.

@github-actions github-actions bot added doc-required PR must not be merged without tech writer approval. and removed changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Aug 4, 2023
@VTPeltoketo VTPeltoketo force-pushed the NCSDK-22850-fota_download-corrected-URI-check branch from 8026ab8 to 0ebde9a Compare August 4, 2023 05:40
@SeppoTakalo SeppoTakalo removed the doc-required PR must not be merged without tech writer approval. label Aug 4, 2023

* Updated:

* Verifies if download started with the same URI and resumes the interrupted download.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Verifies if download started with the same URI and resumes the interrupted download.
* The library now verifies whether the download started with the same URI and resumes the interrupted download.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label Aug 4, 2023
- HASH checksums are used to validate changed URI

Signed-off-by: Veli-Tapani Peltoketo <veli-tapani.peltoketo@nordicsemi.no>
@VTPeltoketo VTPeltoketo force-pushed the NCSDK-22850-fota_download-corrected-URI-check branch from 804d36c to d3bcf52 Compare August 4, 2023 09:49
@VTPeltoketo VTPeltoketo requested a review from b-gent August 4, 2023 12:24
@rlubos rlubos merged commit efbec76 into nrfconnect:main Aug 7, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants