Skip to content

Commit 3447f96

Browse files
authored
Forward port entry kindversion error improvement, bump version to 4.1.0 (#1569)
* models: Forward-port the entry kind version error improvement This is a forward port of #1565 to future proof the error message. Signed-off-by: Jussi Kukkonen <[email protected]> * Changelog: Update for 4.1.0 Add missing entries, also add the 3.6.6 changelog from series/3.6.x Signed-off-by: Jussi Kukkonen <[email protected]> * Bump version to 4.1.0 Signed-off-by: Jussi Kukkonen <[email protected]> --------- Signed-off-by: Jussi Kukkonen <[email protected]>
1 parent 2dbe03a commit 3447f96

File tree

3 files changed

+55
-1
lines changed

3 files changed

+55
-1
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,28 @@ All versions prior to 0.9.0 are untracked.
88

99
## [Unreleased]
1010

11+
## [4.1.0]
12+
13+
### Added
14+
15+
* cli: Support using other Sigstore instances with `--instance URL`.
16+
New instances are trusted with new top level command `trust-instance ROOTFILE`.
17+
[#1548](https://github.com/sigstore/sigstore-python/pull/1548)
18+
19+
### Changed
20+
21+
* Added cryptography 46 to list of compatible cryptography releases
22+
([#1544](https://github.com/sigstore/sigstore-python/pull/1544))
23+
* Improved error message when verifying bundles with unsupported log entry versions
24+
([#1569](https://github.com/sigstore/sigstore-python/pull/1569))
25+
26+
### Fixed
27+
28+
* cli: Always read/write UTF-8. This fixes an issue on Windows where the platform
29+
default encoding was used: the issue has existed for a while, but became more visible
30+
with signature bundles that contain rekor2 entries.
31+
[#1553](https://github.com/sigstore/sigstore-python/pull/1553)
32+
1133
## [4.0.0]
1234

1335
This is a major release with a host of API and functionality changes. The major new feature
@@ -76,6 +98,14 @@ is Rekor v2 support but many other changes are also included, see list below.
7698
* verify: Handle unset TSA timestamp validity end
7799
[#1368](https://github.com/sigstore/sigstore-python/pull/1368)
78100

101+
## [3.6.6]
102+
103+
### Changed
104+
105+
* Improved error message when verifying bundles with rekor v2 entries
106+
([#1565](https://github.com/sigstore/sigstore-python/pull/1565))
107+
* Added cryptography 46 to list of compatible cryptography releases
108+
([#1566](https://github.com/sigstore/sigstore-python/pull/1566))
79109

80110
## [3.6.5]
81111

sigstore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
* `sigstore.sign`: creation of Sigstore signatures
2626
"""
2727

28-
__version__ = "4.0.0"
28+
__version__ = "4.1.0"

sigstore/models.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,25 @@ def diagnostics(self) -> str:
325325
)
326326

327327

328+
class IncompatibleEntry(InvalidBundle):
329+
"""
330+
Raised when the log entry within the `Bundle` has an incompatible KindVersion.
331+
"""
332+
333+
def diagnostics(self) -> str:
334+
"""Returns diagnostics for the error."""
335+
336+
return dedent(
337+
f"""\
338+
The provided bundle contains a transparency log entry that is incompatible with this version of sigstore-python. Please upgrade your verifying client.
339+
340+
Additional context:
341+
342+
{self}
343+
"""
344+
)
345+
346+
328347
class Bundle:
329348
"""
330349
Represents a Sigstore bundle.
@@ -426,6 +445,11 @@ def _verify(self) -> None:
426445
raise InvalidBundle("expected exactly one log entry in bundle")
427446
tlog_entry = tlog_entries[0]
428447

448+
if tlog_entry.kind_version.version not in ["0.0.1", "0.0.2"]:
449+
raise IncompatibleEntry(
450+
f"Expected log entry version 0.0.1 - 0.0.2, got {tlog_entry.kind_version.version}"
451+
)
452+
429453
# Handling of inclusion promises and proofs varies between bundle
430454
# format versions:
431455
#

0 commit comments

Comments
 (0)