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

x509/policy: add WebPKI permitted algorithms #9548

Merged
merged 10 commits into from Sep 9, 2023

Conversation

woodruffw
Copy link
Contributor

@woodruffw woodruffw commented Sep 6, 2023

This is another breakout from #8873 and #9405.

WIP while we work out some unexpected encodings.

CC @facutuesca to take over.

Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw
Copy link
Contributor Author

xref https://cabforum.org/wp-content/uploads/CA-Browser-Forum-BR-v2.0.0.pdf pages 97 ff. for the canonical encodings here.

@woodruffw woodruffw marked this pull request as ready for review September 7, 2023 15:04
src/rust/Cargo.toml Outdated Show resolved Hide resolved
src/rust/cryptography-x509-validation/src/policy/mod.rs Outdated Show resolved Hide resolved
src/rust/cryptography-x509-validation/src/policy/mod.rs Outdated Show resolved Hide resolved

/// Permitted algorithms, from CA/B Forum's Baseline Requirements, section 7.1.3.2 (pages 96-98)
/// https://cabforum.org/wp-content/uploads/CA-Browser-Forum-BR-v2.0.0.pdf
pub static WEBPKI_PERMITTED_ALGORITHMS: Lazy<HashSet<AlgorithmIdentifier<'_>>> = Lazy::new(|| {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you envision this being used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok we might need to take a step back here, because when we spoke I think we agreed to move away from the profiles idea, so I'm struggling a bit to understand how the pieces fit together here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there are no more profiles in the current design -- there's only one "policy," and in our last discussion we came to the conclusion (IIRC) that the right way to offer configurability here was to allow "helper" instantiations like Policy::webpki() that pre-fill the things that would otherwise go under a full "profile."

Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
@alex alex merged commit 69df0bd into pyca:main Sep 9, 2023
59 checks passed
@woodruffw woodruffw deleted the tob-webpki-permitted branch February 26, 2024 15:13
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.

None yet

3 participants