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

SignedCertificateTimestamp ignores version when parsing #142

Open
lilyball opened this issue Apr 28, 2023 · 1 comment
Open

SignedCertificateTimestamp ignores version when parsing #142

lilyball opened this issue Apr 28, 2023 · 1 comment

Comments

@lilyball
Copy link

NOT A CONTRIBUTION

The SignedCertificateTimestamp value parses the whole thing regardless of the version number. RFC 6962 only defines what V1 looks like. The comparable OpenSSL struct has a field that contains the raw encoded SCT in the event that the version is not V1, and only fills in the other fields for V1.

Given that we don't know what V2 would look like, OpenSSL's approach of assuming that the only field we know will exist in V2 is the version field seems like the right approach. With the way x509-parser is doing it, if a V2 SCT ever shows up and cannot be decoded the way V1 is (which seems likely, otherwise why change the version), the entire list of SCTs will fail to parse.

@chifflier
Copy link
Member

Indeed, rfc9162 describes the structure of TransItem and SignedCertificateTimestampDataV2 and even if they look mostly compatible with v1, this may require changes to make it easier to support multiple versions.
As this may need some refactoring, I'm planning it to the next feature release.

Note: if someone has example data please add or link them to this issue, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants