Skip to content

Commit 9c8622d

Browse files
authored
Merge pull request #1908 from MVrachev/update-spec-ver
Use spec version from tuf/api/metadata in examples
2 parents 8ac7167 + 0611884 commit 9c8622d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/repo_example/basic_repo.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from securesystemslib.signer import SSlibSigner
3131

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

85-
SPEC_VERSION = "1.0.19"
86+
SPEC_VERSION = ".".join(SPECIFICATION_VERSION)
8687

8788
# Define containers for role objects and cryptographic keys created below. This
8889
# allows us to sign and write metadata in a batch more easily.

examples/repo_example/hashed_bin_delegation.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from securesystemslib.signer import SSlibSigner
2727

2828
from tuf.api.metadata import (
29+
SPECIFICATION_VERSION,
2930
DelegatedRole,
3031
Delegations,
3132
Key,
@@ -41,7 +42,7 @@ def _in(days: float) -> datetime:
4142
return datetime.utcnow().replace(microsecond=0) + timedelta(days=days)
4243

4344

44-
SPEC_VERSION = "1.0.19"
45+
SPEC_VERSION = ".".join(SPECIFICATION_VERSION)
4546
roles: Dict[str, Metadata] = {}
4647
keys: Dict[str, Dict[str, Any]] = {}
4748

0 commit comments

Comments
 (0)