Skip to content

Commit c1a6f8f

Browse files
woodruffwjleightcap
authored andcommitted
sigstore: RekorEntryMissing -> LogEntryMissing (#414)
* sigstore: `RekorEntryMissing -> `LogEntryMissing` Signed-off-by: William Woodruff <[email protected]> * CHANGELOG: record changes Signed-off-by: William Woodruff <[email protected]> Signed-off-by: William Woodruff <[email protected]>
1 parent 9aca920 commit c1a6f8f

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ All versions prior to 0.9.0 are untracked.
1414
have been renamed to removed implementation detail references
1515
([#402](https://github.com/sigstore/sigstore-python/pull/402))
1616

17+
* `sigstore.transparency.RekorEntryMissing` is now `LogEntryMissing`
18+
([#414](https://github.com/sigstore/sigstore-python/pull/414))
19+
1720
## [0.10.0]
1821

1922
### Added

sigstore/_cli.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
from sigstore.transparency import LogEntry
4646
from sigstore.verify import (
4747
CertificateVerificationFailure,
48-
RekorEntryMissing,
48+
LogEntryMissing,
4949
VerificationFailure,
5050
VerificationMaterials,
5151
Verifier,
@@ -852,7 +852,7 @@ def _verify_identity(args: argparse.Namespace) -> None:
852852
),
853853
file=sys.stderr,
854854
)
855-
elif isinstance(result, RekorEntryMissing):
855+
elif isinstance(result, LogEntryMissing):
856856
# If Rekor lookup failed, it's because the certificate either
857857
# wasn't logged after creation or because the user requested the
858858
# wrong Rekor instance (e.g., staging instead of production).
@@ -943,7 +943,7 @@ def _verify_github(args: argparse.Namespace) -> None:
943943
),
944944
file=sys.stderr,
945945
)
946-
elif isinstance(result, RekorEntryMissing):
946+
elif isinstance(result, LogEntryMissing):
947947
# If Rekor lookup failed, it's because the certificate either
948948
# wasn't logged after creation or because the user requested the
949949
# wrong Rekor instance (e.g., staging instead of production).

sigstore/verify/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
)
6060
from sigstore.verify.verifier import (
6161
CertificateVerificationFailure,
62-
RekorEntryMissing,
62+
LogEntryMissing,
6363
Verifier,
6464
)
6565

6666
__all__ = [
6767
"CertificateVerificationFailure",
68-
"RekorEntryMissing",
68+
"LogEntryMissing",
6969
"Verifier",
7070
"VerificationResult",
7171
"VerificationSuccess",

sigstore/verify/verifier.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@
5656
logger = logging.getLogger(__name__)
5757

5858

59-
class RekorEntryMissing(VerificationFailure):
59+
class LogEntryMissing(VerificationFailure):
6060
"""
61-
A specialization of `VerificationFailure` for Rekor lookup failures,
61+
A specialization of `VerificationFailure` for transparency log lookup failures,
6262
with additional lookup context.
6363
"""
6464

65-
reason: str = "Rekor has no entry for the given verification materials"
65+
reason: str = (
66+
"The transparency log has no entry for the given verification materials"
67+
)
6668

6769
signature: str
6870
"""
@@ -232,7 +234,7 @@ def verify(
232234
try:
233235
entry = materials.rekor_entry(self._rekor)
234236
except RekorEntryMissingError:
235-
return RekorEntryMissing(
237+
return LogEntryMissing(
236238
signature=base64.b64encode(materials.signature).decode(),
237239
artifact_hash=materials.input_digest.hex(),
238240
)

0 commit comments

Comments
 (0)