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

client: Handle updating root with keys that do not match the local meta #58

Merged
merged 2 commits into from
Jan 23, 2015

Conversation

titanous
Copy link
Contributor

Closes #40

Version downgrade attack during this scenario is not tested, as it is very unlikely (it would require intentionally signing a metadata file with the wrong version, which makes no sense). The version decode step was verified manually, as it would be very tricky to test (if you have a simple way of testing, suggestions welcome).

If this is not deferred, a failing Assert inside of f will cause
signed.IsExpired to not get reset. A failing Assert triggers Goexit
which calls deferred functions before the goroutine exits (it is
essentially a silent panic).

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
This ensures that we can update even if the local root is expired and
the remote root trusts new keys. For sanity, we decode any local
metadata versions without checking signatures.

Closes #39

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
@lmars
Copy link
Contributor

lmars commented Jan 23, 2015

LGTM

titanous added a commit that referenced this pull request Jan 23, 2015
client: Handle updating root with keys that do not match the local meta
@titanous titanous merged commit 3a91dca into master Jan 23, 2015
@titanous titanous deleted the new-root-new-keys branch January 23, 2015 20:45
rdimitrov pushed a commit to rdimitrov/go-tuf that referenced this pull request Jan 25, 2024
* feat(log): add global default logger

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* feat(log): exchange logger in library code

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* feat(log): remove logrus from testutil

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* feat(log): replace logrus in example code

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* chore(log): run go mod tidy for new logger

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* test: add tests for logger set/get functions

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

---------

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
rdimitrov pushed a commit that referenced this pull request Jan 29, 2024
* feat(log): add global default logger

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* feat(log): exchange logger in library code

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* feat(log): remove logrus from testutil

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* feat(log): replace logrus in example code

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* chore(log): run go mod tidy for new logger

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* test: add tests for logger set/get functions

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

---------

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
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.

Local metadata which does not verify should not block updates
2 participants