Skip to content

Commit

Permalink
Merge pull request theupdateframework#1908 from MVrachev/update-spec-ver
Browse files Browse the repository at this point in the history
Use spec version from tuf/api/metadata in examples
  • Loading branch information
lukpueh authored Mar 17, 2022
2 parents 8ac7167 + 0611884 commit 9c8622d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/repo_example/basic_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from securesystemslib.signer import SSlibSigner

from tuf.api.metadata import (
SPECIFICATION_VERSION,
DelegatedRole,
Delegations,
Key,
Expand Down Expand Up @@ -82,7 +83,7 @@ def _in(days: float) -> datetime:
# expiration intervals, whereas roles that change less and might use offline
# keys (root, delegating targets) may have longer expiration intervals.

SPEC_VERSION = "1.0.19"
SPEC_VERSION = ".".join(SPECIFICATION_VERSION)

# Define containers for role objects and cryptographic keys created below. This
# allows us to sign and write metadata in a batch more easily.
Expand Down
3 changes: 2 additions & 1 deletion examples/repo_example/hashed_bin_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from securesystemslib.signer import SSlibSigner

from tuf.api.metadata import (
SPECIFICATION_VERSION,
DelegatedRole,
Delegations,
Key,
Expand All @@ -41,7 +42,7 @@ def _in(days: float) -> datetime:
return datetime.utcnow().replace(microsecond=0) + timedelta(days=days)


SPEC_VERSION = "1.0.19"
SPEC_VERSION = ".".join(SPECIFICATION_VERSION)
roles: Dict[str, Metadata] = {}
keys: Dict[str, Dict[str, Any]] = {}

Expand Down

0 comments on commit 9c8622d

Please sign in to comment.