Skip to content

Commit

Permalink
sign: Make SigningResult._to_bundle() public
Browse files Browse the repository at this point in the history
This enables signing applications to use the bundle format and seems in
line with the other similar decisions:
* The bundle is already part of the CLI interface
* verify already contains similar public API
  (VerificationMaterials.from_bundle() is public)

Closes #763

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
  • Loading branch information
jku committed Sep 8, 2023
1 parent c587d32 commit f5fc2c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit f5fc2c3

Please sign in to comment.