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

subject_name: more specific errs for invalid names. #60

Merged
merged 1 commit into from
May 3, 2023
Merged

subject_name: more specific errs for invalid names. #60

merged 1 commit into from
May 3, 2023

Commits on May 3, 2023

  1. subject_name: more specific errs for invalid names.

    Previously the `presented_id_matches_constraint` and
    `presented_id_matches_reference_id` functions used by
    `verify_cert_dns_name` would return an `Option<bool>`, with the `None`
    case translated into `Error::BadDer`. This makes it difficult for
    downstream users to know that the encoding error was specific to an
    invalid presented DNS ID, or a name constraint.
    
    This commit introduces two new error variants: `MalformedDnsIdentifier`
    and `MalformedNameConstraint`. The `presented_id_matches_constraint` and
    `presented_id_matches_reference_id` functions are changed to return
    `Result<bool, Error>` using the new error types.
    cpu committed May 3, 2023
    Configuration menu
    Copy the full SHA
    81656d5 View commit details
    Browse the repository at this point in the history