Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sign: Make SigningResult._to_bundle() public #765

Merged
merged 3 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Thank you :)

#### Release Note
<!--
Add a release note for each of the following conditions:
Add a release note for each of the following conditions in CHANGELOG.md:

* Config changes (additions, deletions, updates)
* API additions—new endpoint, new response fields, or newly accepted request parameters
Expand All @@ -28,7 +28,7 @@ Add a release note for each of the following conditions:
* Bug fixes and fixes of previous known issues
* Deprecation warnings, breaking changes, or compatibility notes

If no release notes are required write NONE. Use past-tense.
Use past-tense.

-->

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ All versions prior to 0.9.0 are untracked.
producing a standard Sigstore bundle from `sigstore-python`'s internal
representation ([#719](https://github.com/sigstore/sigstore-python/pull/719))

* API addition: New method `sign.SigningResult.to_bundle()` allows signing
applications to serialize to the bundle format that is already usable in
verification with `verify.VerificationMaterials.from_bundle()`
([#765](https://github.com/sigstore/sigstore-python/pull/765))

### Changed

* `sigstore verify` now performs additional verification of Rekor's inclusion
Expand Down
2 changes: 1 addition & 1 deletion sigstore/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def _sign(args: argparse.Namespace) -> None:

if outputs["bundle"] is not None:
with outputs["bundle"].open(mode="w") as io:
print(result._to_bundle().to_json(), file=io)
print(result.to_bundle().to_json(), file=io)
print(f"Sigstore bundle written to {outputs['bundle']}")


Expand Down
2 changes: 1 addition & 1 deletion sigstore/sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class SigningResult(BaseModel):
A record of the Rekor log entry for the signing operation.
"""

def _to_bundle(self) -> Bundle:
def to_bundle(self) -> Bundle:
"""
Creates a Sigstore bundle (as defined by Sigstore's protobuf specs)
from this `SigningResult`.
Expand Down