Skip to content

Commit

Permalink
Read Fulcio certificate chain as bytes in verify command (#796)
Browse files Browse the repository at this point in the history
* Read Fulcio certificate chain as bytes

Signed-off-by: Maya Costantini <maya.costantini@protonmail.com>

* Add changelog entry for certificate chain loading fix

Signed-off-by: Maya Costantini <maya.costantini@protonmail.com>

* Update CHANGELOG.md

Signed-off-by: William Woodruff <william@yossarian.net>

---------

Signed-off-by: Maya Costantini <maya.costantini@protonmail.com>
Signed-off-by: William Woodruff <william@yossarian.net>
Co-authored-by: Maya Costantini <maya.costantini@protonmail.com>
Co-authored-by: William Woodruff <william@yossarian.net>
  • Loading branch information
3 people authored Oct 17, 2023
1 parent 5420a8d commit ee3d313
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ All versions prior to 0.9.0 are untracked.

## [Unreleased]

### Fixed

* CLI: When using `--certificate-chain`, read as `bytes` instead of `str`
as expected by the underlying API ([#796](https://github.com/sigstore/sigstore-python/pull/796))

## [2.0.0]

### Added
Expand Down
4 changes: 2 additions & 2 deletions sigstore/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def _parser() -> argparse.ArgumentParser:
instance_options.add_argument(
"--certificate-chain",
metavar="FILE",
type=argparse.FileType("r"),
type=argparse.FileType("rb"),
help=(
"Path to a list of CA certificates in PEM format which will be needed when building "
"the certificate chain for the Fulcio signing certificate"
Expand Down Expand Up @@ -488,7 +488,7 @@ def _parser() -> argparse.ArgumentParser:
instance_options.add_argument(
"--certificate-chain",
metavar="FILE",
type=argparse.FileType("r"),
type=argparse.FileType("rb"),
help=(
"Path to a list of CA certificates in PEM format which will be needed when building "
"the certificate chain for the Fulcio signing certificate"
Expand Down

0 comments on commit ee3d313

Please sign in to comment.