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

Avoid signature expired error on index update, if the clock time is not set correctly. #2744

Closed
wants to merge 3 commits into from

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Nov 7, 2024

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Some users reported spurious "expired signature" errors. After some investigation, we found that all of them had the wrong system date set on their machine, with a date set in the past. Even if the error says that the signature is "expired", it's a signature that is not yet valid (it will be in the future).
Since we cannot trust the system clock, we recheck the signature with a future date so we may avoid displaying a difficult-to-understand error to the user.

This PR will suppress the, apparently unrelated, signature expired error in such cases.

What is the current behavior?

An index update will trigger a signature expired error if the clock is set to a past date.

What is the new behavior?

If the clock is set to a past date, an index update will no longer trigger a signature expired error.

Does this PR introduce a breaking change, and is titled accordingly?

No

Other information

@cmaglie cmaglie self-assigned this Nov 7, 2024
@cmaglie cmaglie added this to the Arduino CLI v1.1.1 milestone Nov 7, 2024
@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Nov 7, 2024
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.57%. Comparing base (49c154a) to head (8a17891).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2744      +/-   ##
==========================================
- Coverage   67.65%   67.57%   -0.09%     
==========================================
  Files         237      237              
  Lines       22356    22367      +11     
==========================================
- Hits        15126    15114      -12     
- Misses       6036     6063      +27     
+ Partials     1194     1190       -4     
Flag Coverage Δ
unit 67.57% <100.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmaglie
Copy link
Member Author

cmaglie commented Nov 8, 2024

Superseded by #2750

@cmaglie cmaglie closed this Nov 8, 2024
@cmaglie cmaglie deleted the gpg_signature_in_the_future branch November 8, 2024 17:27
@cmaglie cmaglie removed this from the Arduino CLI v1.1.1 milestone Nov 8, 2024
@per1234 per1234 added the conclusion: duplicate Has already been submitted label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants