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

Minor refactoring of Fulcio SCT handling #1259

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jku
Copy link
Member

@jku jku commented Dec 13, 2024

Summary

Simplify SCT management in fulcio client and the sites that need to call verify_sct()

Fixes #1258

Leaving draft until I have another look myself.

Release Note

N/A: No public API changes or CLI changes are expected.

jku added 2 commits December 13, 2024 11:59
Functionality should not change: Except a few more errors are handled.
The sct module API changes but it is internal.

* Remove one unnecessary internal exception and one unused exception
* We only support a single SCT: simplify the sct module API
* Make sure all errors raised in sct.get_signed_certificate_timestamp()
  are actually handled (by only raising ValueError and handling that)
* Handle SCT parsing errors during verify

Signed-off-by: Jussi Kukkonen <[email protected]>
Simplify FulcioCertificateSigningResponse by removing sct field from it.
This changes the (internal) fulcio module API.

The only place that needs the SCT is verify_sct() and it already gets
the certificate which it can trivially get the SCT from.

This makes get_signed_certificate_timestamp() an internal implementation
detail of verify_sct() which is nice.

FulcioSigningCert.post() changes in that it could now return a response
without an SCT: this is ok as it is immediately verified in
the callsite in Signer._signing_cert().

Signed-off-by: Jussi Kukkonen <[email protected]>
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

Successfully merging this pull request may close these issues.

refactor sct handling
1 participant