fix: pkcs cert chain crash + b64 encode cert in bundle + missing tlog entry#615
Merged
mihaimaruseac merged 1 commit intosigstore:mainfrom Feb 19, 2026
Merged
Conversation
c2ac7b6 to
9d70df5
Compare
Signed-off-by: Sachin Sampras M <[email protected]>
9d70df5 to
304158e
Compare
| raw_bytes=base64.b64encode( | ||
| certificate.public_bytes( | ||
| encoding=serialization.Encoding.DER | ||
| ) |
Contributor
There was a problem hiding this comment.
Thanks for fixing this. This was something I forgot to change when moving to 'sigstore models'.
| certificates=chain | ||
| ) | ||
| ), | ||
| tlog_entries=[], |
| self._trust_chain = x509.load_pem_x509_certificates( | ||
| b"".join([path.read_bytes() for path in certificate_chain_paths]) | ||
| chain_bytes = b"".join( | ||
| [path.read_bytes() for path in certificate_chain_paths] |
Contributor
There was a problem hiding this comment.
So this fixes an issue when no certificate_chain_paths entries are provided? So certfificate_chain_paths is []?
Member
There was a problem hiding this comment.
>>> from cryptography import x509
>>> x509.load_pem_x509_certificates(b"")
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
x509.load_pem_x509_certificates(b"")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
ValueError: Unable to load PEM file. See https://cryptography.io/en/latest/faq/#why-can-t-i-import-my-pem-file for more details. MalformedFraming
>>> x509.load_pem_x509_certificates(b"".join([]))
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
x509.load_pem_x509_certificates(b"".join([]))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
ValueError: Unable to load PEM file. See https://cryptography.io/en/latest/faq/#why-can-t-i-import-my-pem-file for more details. MalformedFramingThank you for fixing
stefanberger
approved these changes
Feb 19, 2026
SequeI
approved these changes
Feb 19, 2026
mihaimaruseac
approved these changes
Feb 19, 2026
| self._trust_chain = x509.load_pem_x509_certificates( | ||
| b"".join([path.read_bytes() for path in certificate_chain_paths]) | ||
| chain_bytes = b"".join( | ||
| [path.read_bytes() for path in certificate_chain_paths] |
Member
There was a problem hiding this comment.
>>> from cryptography import x509
>>> x509.load_pem_x509_certificates(b"")
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
x509.load_pem_x509_certificates(b"")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
ValueError: Unable to load PEM file. See https://cryptography.io/en/latest/faq/#why-can-t-i-import-my-pem-file for more details. MalformedFraming
>>> x509.load_pem_x509_certificates(b"".join([]))
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
x509.load_pem_x509_certificates(b"".join([]))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
ValueError: Unable to load PEM file. See https://cryptography.io/en/latest/faq/#why-can-t-i-import-my-pem-file for more details. MalformedFramingThank you for fixing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses bug fixes for the following issues:
Checklist