-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate spec_version during initialization
Even though version strings like "2.0.0-rc.2" or "1.0.0-beta" are valid strings in semantic versioning format, in TUF we never needed to add letters for our specification number. That's why I validate that: spec_version is a . separated string and when split it has a length of 3 and that each of the three elements is a number. Also, I check that the given spec_version is supported against the tuf code spec version. Signed-off-by: Martin Vrachev <[email protected]>
- Loading branch information
Showing
2 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +0,0 @@ | ||
"""TUF new API | ||
This package contains all modules related to the TUF refactoring effort. | ||
""" | ||
# This reference implementation produces metadata intended to conform to | ||
# version 1.0.0 of the TUF specification, and is expected to consume metadata | ||
# conforming to version 1.0.0 of the TUF specification. | ||
# All downloaded metadata must be equal to our supported major version of 1. | ||
# For example, "1.4.3" and "1.0.0" are supported. "2.0.0" is not supported. | ||
# See https://github.com/theupdateframework/specification | ||
SPECIFICATION_VERSION = ["1", "0", "0"] | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters