Skip to content

Add tbs_precertificate_bytes property - #7267

Closed
tetsuo-cpp wants to merge 1 commit into
pyca:mainfrom
tetsuo-cpp:alex/tbs-precert
Closed

tetsuo-cpp wants to merge 1 commit into
pyca:mainfrom
tetsuo-cpp:alex/tbs-precert

Conversation

@tetsuo-cpp

@tetsuo-cpp tetsuo-cpp commented May 25, 2022 •

Copy link
Copy Markdown
Contributor
  • Unit tests
  • Docs

This is required for verifying embedded SCTs in sigstore-python. According to IETF's RFC 6962, this data is part of the digitally signed payload that forms the SCT's signature. This still needs unit tests.

CC: @woodruffw @di

@alex

alex commented May 25, 2022

Copy link
Copy Markdown
Member

Thanks for contributing! In addition to tests, we'll also need documentation for that.

I haven't done a full review, but a basic question: Should it be an error to try to get the precert bytes for a certificate that doesn't have the PreCert SCT extension?

@woodruffw

Copy link
Copy Markdown
Member

Should it be an error to try to get the precert bytes for a certificate that doesn't have the PreCert SCT extension?

IMO, yes. I think we should probably raise a ValueError for that.

@tetsuo-cpp

Copy link
Copy Markdown
Contributor Author

Should it be an error to try to get the precert bytes for a certificate that doesn't have the PreCert SCT extension?

IMO, yes. I think we should probably raise a ValueError for that.

Sounds good. I'll do that.

@woodruffw

Copy link
Copy Markdown
Member

As an aside: we should think about how we want to name this: tbs_precertificate_bytes might be ambiguous in context, since it's not clear whether the a user should expect it to contain the poison extension and/or SignedCertificateTimestampList extension, or whether they should be stripped out by default.

@woodruffw

Copy link
Copy Markdown
Member

#7279 supersedes this. @alex / @reaperhulk, feel free to close.

@alex alex closed this May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants