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

verification/policy: make subject optional internally #10335

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

woodruffw
Copy link
Contributor

This is not surfaced in a public API yet; it's purely an internal change to enable a ClientVerifier API (which won't take a subject).

See #10276.

This is not surfaced in a public API yet; it's purely
an internal change to enable a `ClientVerifier` API
(which won't take a subject).

Signed-off-by: William Woodruff <[email protected]>
@woodruffw woodruffw marked this pull request as ready for review February 3, 2024 13:33
Comment on lines +307 to +311
if !policy
.subject
.as_ref()
.map_or_else(|| false, |sub| sub.matches(&san))
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

NB: This fails closed if the surrounding Policy doesn't have a configured subject. AFAICT this is the only reasonable behavior, since the SAN extension verifier here only makes sense when a subject is supplied by the user.

(In the context of a new ClientVerifier API, we'll need a different SAN extension verifier.)

@alex alex merged commit 46b2921 into pyca:main Feb 3, 2024
57 checks passed
@woodruffw woodruffw deleted the ww/optional-subject branch February 3, 2024 13:39
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.

2 participants